public void Initialise(ITypeRegistry registry) { registry.RegisterType<IContactsProvider, GoogleContactsProvider>(); registry.RegisterType<IAccountAuthentication, GoogleAuthentication>("GoogleAuthentication"); GoogleConfigSection.EnsureIsValid(); }
private static void ProcessUnresolvedTypes(ITypeRegistry typeRegistry) { foreach (TypeReference unresolvedType in typeRegistry.GetUnresolvedTypes()) { if (IsObjectType(unresolvedType)) { typeRegistry.RegisterType( new TypeReference(typeof(ObjectType <>) .MakeGenericType(unresolvedType.ClrType))); } else if (IsInputObjectType(unresolvedType)) { typeRegistry.RegisterType( new TypeReference(typeof(InputObjectType <>) .MakeGenericType(unresolvedType.ClrType))); } else if (IsEnumType(unresolvedType)) { typeRegistry.RegisterType( new TypeReference(typeof(EnumType <>) .MakeGenericType(unresolvedType.ClrType))); } } }
public void RegisterTypeBindings(ITypeRegistry typeRegistry) { // bind object types foreach (KeyValuePair <ObjectType, ObjectTypeBinding> item in CreateObjectTypeBindings(typeRegistry)) { typeRegistry.RegisterType(item.Key, item.Value); } // bind input object types foreach (KeyValuePair <InputObjectType, InputObjectTypeBinding> item in CreateInputObjectTypeBindings(typeRegistry)) { typeRegistry.RegisterType(item.Key, item.Value); } }
public void Initialise(ITypeRegistry registry) { registry.RegisterSingleton<IUserRepository, UserRepository>(); registry.RegisterSingleton<IContactFeedRepository, ContactFeedRepository>(); registry.RegisterSingleton<IContactRepository, ContactRepository>(); registry.RegisterType<IProcess, InMemoryRepositoryProcess>("InMemoryRepositoryProcess"); }
internal void RegisterDependencies( ITypeRegistry typeRegistry, Action <SchemaError> reportError, INamedType parentType) { if (_nativeNamedType != null) { typeRegistry.RegisterType(_nativeNamedType); } }
public override void Entry(IModHelper helper) { ModPath = helper.DirectoryPath; Logger = Monitor; Localizer = helper.Translation; VersionChecker.AddCheck("AdvancedLocationLoader", GetType().Assembly.GetName().Version, "https://raw.githubusercontent.com/Entoarox/StardewMods/master/VersionChecker/AdvancedLocationLoader.json"); GameEvents.UpdateTick += FirstUpdateTick; MoreEvents.ActionTriggered += Events.MoreEvents_ActionTriggered; MoreEvents.WorldReady += Events.MoreEvents_WorldReady; LocationEvents.CurrentLocationChanged += Events.LocationEvents_CurrentLocationChanged; ITypeRegistry registry = EntoFramework.GetTypeRegistry(); registry.RegisterType <Locations.Greenhouse>(); registry.RegisterType <Locations.Sewer>(); registry.RegisterType <Locations.Desert>(); registry.RegisterType <Locations.DecoratableLocation>(); }
private void ProcessUnresolvedTypes(ITypeRegistry typeRegistry) { foreach (Type type in typeRegistry.GetUnresolvedTypes()) { if (type.IsClass && !type.IsAbstract && (type.IsPublic || type.IsNestedPublic)) { typeRegistry.RegisterType( new TypeReference(typeof(ObjectType <>) .MakeGenericType(type))); } else if (type.IsEnum && (type.IsPublic || type.IsNestedPublic)) { typeRegistry.RegisterType( new TypeReference(typeof(EnumType <>) .MakeGenericType(type))); } } }
public void Initialise(ITypeRegistry registry) { registry.RegisterType<IAccountContactProvider, GoogleAccountContactProvider>("GoogleContactsProvider"); registry.RegisterType<IAccountAuthentication, GoogleAuthentication>("GoogleAuthentication"); registry.RegisterType<IImapClient, ImapClient>(); registry.RegisterType<IGoogleAccountProvider, GoogleAccountProvider>(); registry.RegisterType<ICommunicationProvider, GmailCommunicationQueryProvider>(); registry.RegisterType<IImapDateTranslator, ImapDateTranslator>(); registry.RegisterType<IGoogleContactProfileTranslator, GoogleContactProfileTranslator>(); registry.RegisterType<IAccountTranslator, AccountTranslator>(); }
public void Initialise(ITypeRegistry registry) { registry.RegisterSingleton<IEventStoreClient, EventStoreClient>(); registry.RegisterSingleton<IEventStoreConnectionFactory, EventStoreConnectionFactory>(); registry.RegisterSingleton<Accounts.IAccountContactRefresher, Accounts.AccountContactRefresher>(); registry.RegisterSingleton<IContactFeedRepository, Contacts.EventStoreContactFeedRepository>(); registry.RegisterSingleton<IContactRepository, Contacts.EventStoreContactFeedRepository>();//HACK: The EventStore shouldn't be doing this work. //registry.RegisterType<IAccountContactProvider, Contacts.EventStoreAccountContactProvider>("EventStoreAccountContactProvider"); registry.RegisterSingleton<IUserRepository, Users.UserRepository>(); registry.RegisterType<IProcess, EventStoreProcess>("EventStoreProcess"); }
internal void RegisterDependencies( ITypeRegistry typeRegistry, Action <SchemaError> reportError, INamedType parentType) { if (!_completed) { if (_typeReference != null) { typeRegistry.RegisterType(_typeReference); } } }
public void Initialise(ITypeRegistry registry) { registry.RegisterType<IAccountContactProvider, FakeGoogleAccountContactProvider>(); registry.RegisterType<ICommunicationProvider, FakeGoogleCommunicationProvider>(); registry.RegisterType<ICalendarProvider, FakeGoogleCalendarProvider>(); registry.RegisterType<IGalleryProvider, FakeGoogleGalleryProvider>(); registry.RegisterType<IContactCollaborationProvider, FakeGoogleContactCollaborationProvider>(); registry.RegisterType<IAccountAuthentication, FakeGoogleAuthentication>("FakeGoogleAuthentication"); }
protected override void VisitObjectTypeDefinition( ObjectTypeDefinitionNode node) { _typeRegistry.RegisterType(_objectTypeFactory.Create(node)); }
public void Initialise(ITypeRegistry registry) { registry.RegisterType<IAccountContactProvider, LinkedInAccountContactProvider>("LinkedInContactsProvider"); registry.RegisterType<IAccountAuthentication, LinkedInAuthentication>("LinkedInAuthentication"); registry.RegisterType<ILinkedInAccountProvider, LinkedInAccountProvider>(); }