protected override void OnRegisterDependencies(
            ITypeInitializationContext context)
        {
            base.OnRegisterDependencies(context);

            context.RegisterType(new TypeReference(typeof(T)));
            context.RegisterType(new TypeReference(typeof(EdgeType <T>)));
        }
Beispiel #2
0
        protected override void OnRegisterDependencies(ITypeInitializationContext context)
        {
            base.OnRegisterDependencies(context);

            foreach (TypeReference typeReference in _types)
            {
                context.RegisterType(typeReference);
            }
        }
Beispiel #3
0
        protected override void OnRegisterDependencies(
            ITypeInitializationContext context)
        {
            base.OnRegisterDependencies(context);

            if (_interfaces != null)
            {
                foreach (TypeReference typeReference in _interfaces)
                {
                    context.RegisterType(typeReference);
                }
            }

            RegisterFields(context);

            if (_typeBinding != null)
            {
                context.RegisterType(this, _typeBinding);
            }
        }
Beispiel #4
0
        protected override void OnRegisterDependencies(
            ITypeInitializationContext context)
        {
            AddLateBoundResolverFields(context.GetResolverTypes(Name));
            InitializeFields(_description);

            base.OnRegisterDependencies(context);

            if (_interfaces != null)
            {
                foreach (TypeReference typeReference in _interfaces)
                {
                    context.RegisterType(typeReference);
                }
            }

            RegisterFields(context);

            if (_typeBinding != null)
            {
                context.RegisterType(this, _typeBinding);
            }
        }
Beispiel #5
0
        protected override void OnRegisterDependencies(
            ITypeInitializationContext context)
        {
            base.OnRegisterDependencies(context);

            if (context.Type == null)
            {
                throw new InvalidOperationException(
                          "It is not allowed to initialize a field without " +
                          "a type context.");
            }

            if (TypeReference != null)
            {
                context.RegisterType(TypeReference);
            }
        }
Beispiel #6
0
        protected override void OnRegisterDependencies(
            ITypeInitializationContext context)
        {
            base.OnCompleteType(context);

            if (!context.IsDirective && context.Type == null)
            {
                throw new InvalidOperationException(
                          "It is not allowed to initialize a field without " +
                          "a type context.");
            }

            if (TypeReference != null)
            {
                string s = TypeReference.ToString();
                context.RegisterType(TypeReference);
            }
        }