Example #1
0
    public void Type(Type type)
    {
        ITypeInfo typeInfo = Context.TypeInspector.CreateTypeInfo(type);

        if (typeInfo.IsSchemaType && !typeInfo.IsInputType())
        {
            throw new ArgumentException(TypeResources.ArgumentDescriptor_InputTypeViolation);
        }

        Definition.SetMoreSpecificType(typeInfo.GetExtendedType(), TypeContext.Input);
    }