Ejemplo n.º 1
0
 protected override void OnRegisterDependencies(
     ITypeDiscoveryContext context,
     EnumTypeDefinition definition)
 {
     base.OnRegisterDependencies(context, definition);
     context.RegisterDependencies(definition);
 }
Ejemplo n.º 2
0
        public override void OnBeforeRegisterDependencies(
            ITypeDiscoveryContext discoveryContext,
            DefinitionBase?definition,
            IDictionary <string, object?> contextData)
        {
            if (definition is FilterInputTypeDefinition def)
            {
                IFilterConvention convention = GetConvention(
                    discoveryContext.DescriptorContext,
                    def.Scope);

                SchemaTypeReference typeReference = TypeReference.Create(
                    discoveryContext.Type,
                    def.Scope);

                var descriptor = FilterInputTypeDescriptor.New(
                    discoveryContext.DescriptorContext,
                    def.EntityType,
                    def.Scope);

                convention.ApplyConfigurations(typeReference, descriptor);

                FilterInputTypeDefinition extensionDefinition = descriptor.CreateDefinition();

                discoveryContext.RegisterDependencies(extensionDefinition);
            }
        }
 protected override void OnRegisterDependencies(
     ITypeDiscoveryContext context,
     InputObjectTypeDefinition definition)
 {
     base.OnRegisterDependencies(context, definition);
     context.RegisterDependencies(definition);
     SetTypeIdentity(typeof(InputObjectType <>));
 }
Ejemplo n.º 4
0
        private void OnBeforeRegisteringDependencies(
            ITypeDiscoveryContext discoveryContext,
            SortEnumTypeDefinition definition)
        {
            ISortConvention convention = GetConvention(
                discoveryContext.DescriptorContext,
                definition.Scope);

            var descriptor = SortEnumTypeDescriptor.New(
                discoveryContext.DescriptorContext,
                definition.EntityType,
                definition.Scope);

            SchemaTypeReference typeReference = TypeReference.Create(
                discoveryContext.Type,
                definition.Scope);

            convention.ApplyConfigurations(typeReference, descriptor);

            SortEnumTypeDefinition extensionDefinition = descriptor.CreateDefinition();

            discoveryContext.RegisterDependencies(extensionDefinition);
        }