示例#1
0
        protected override void OnCompleteType(
            ITypeInitializationContext context)
        {
            base.OnCompleteType(context);

            if (Type != null)
            {
                CompleteDefaultValue(context, Type);

                if (context.Type is InputObjectType &&
                    Property == null &&
                    context.TryGetProperty(context.Type, Name, out PropertyInfo property))
                {
                    Property = property;
                }
            }
        }