This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import Foundation | |
| extension Notification.Name { | |
| static let darkModeEnabled = Notification.Name("net.sltch.vcoin.notifications.darkModeEnabled") | |
| static let darkModeDisabled = Notification.Name("net.sltch.vcoin.notifications.darkModeDisabled") | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import Foundation | |
| import CoreData | |
| import UIKit | |
| class SettingsHandler : CoreDataHandler { | |
| func getDefaultSettings() -> Settings { | |
| var settingsList:[Settings] = [] | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> | |
| <html lang="en"> | |
| <head> | |
| <meta http-equiv="content-type" content="text/html; charset=utf-8"> | |
| <title>Maintenance</title> | |
| <link href=' http://fonts.googleapis.com/css?family=Roboto' rel='stylesheet' type='text/css'> | |
| <style> | |
| body { | |
| background-color: #E74D3D; | |
| font-family: Roboto; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var serviceAssembly = typeof(IGraphQLType).GetTypeInfo().Assembly; | |
| builder.RegisterAssemblyTypes(serviceAssembly) | |
| .Where(t => t.GetInterfaces() | |
| .Any(i => i.IsAssignableFrom(typeof (IGraphQLType)))) | |
| .AsSelf(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public class GroupDto | |
| { | |
| public string Name { get; set; } | |
| public string SvgIcon { get; set; } | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public class GroupType : ObjectGraphType<GroupDto>, IGraphQLType | |
| { | |
| public GroupType() | |
| { | |
| Field(x => x.Name).Description("The group name."); | |
| Field(x => x.SvgIcon).Description("The icon of group."); | |
| } | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var serviceAssembly = typeof(IResolver).GetTypeInfo().Assembly; | |
| builder.RegisterAssemblyTypes(serviceAssembly) | |
| .Where(t => t.Name.EndsWith("Resolver")) | |
| .AsImplementedInterfaces() | |
| .InstancePerLifetimeScope(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public class GroupsResolver : Resolver, IGroupsResolver | |
| { | |
| private readonly IGroupsService _groupsService; | |
| public GroupsResolver(IGroupsService groupsService) | |
| { | |
| _groupsService = groupsService; | |
| } | |
| public void Resolve(GraphQLQuery graphQLQuery) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public interface IResolver | |
| { | |
| void Resolve(GraphQLQuery graphQLQuery); | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public class GraphQLQuery : ObjectGraphType | |
| { | |
| public GraphQLQuery(IServiceProvider serviceProvider) | |
| { | |
| var type = typeof(IResolver); | |
| var resolversTypes = AppDomain.CurrentDomain.GetAssemblies() | |
| .SelectMany(s => s.GetTypes()) | |
| .Where(p => type.IsAssignableFrom(p)); | |
| foreach(var resolverType in resolversTypes) |