/// <summary> /// Constructor /// </summary> public ScriptTaskParameter(string InName, FieldInfo InFieldInfo, TaskParameterValidationType InValidationType, bool bInOptional) { Name = InName; FieldInfo = InFieldInfo; ValidationType = InValidationType; bOptional = bInOptional; }
/// <summary> /// Constructor /// </summary> public ScriptTaskParameter(string InName, FieldInfo InFieldInfo, TaskParameterValidationType InValidationType, bool bInOptional) { Name = InName; FieldInfo = InFieldInfo; ValidationType = InValidationType; bOptional = bInOptional; }
/// <summary> /// Constructor /// </summary> public ScriptTaskParameter(string InName, FieldInfo InFieldInfo, TaskParameterValidationType InValidationType, bool bInOptional) { Name = InName; FieldInfo = InFieldInfo; ValueType = FieldInfo.FieldType; ValidationType = InValidationType; bOptional = bInOptional; if (ValueType.IsGenericType && ValueType.GetGenericTypeDefinition() == typeof(Nullable <>)) { ValueType = ValueType.GetGenericArguments()[0]; bOptional = true; } }
/// <summary> /// Gets the qualified name of the schema type for the given type of validation /// </summary> /// <returns>Qualified name for the corresponding schema type</returns> static XmlQualifiedName GetQualifiedTypeName(TaskParameterValidationType Type) { switch (Type) { case TaskParameterValidationType.Name: return(GetQualifiedTypeName(ScriptSchemaStandardType.Name)); case TaskParameterValidationType.NameList: return(GetQualifiedTypeName(ScriptSchemaStandardType.NameList)); case TaskParameterValidationType.Tag: return(GetQualifiedTypeName(ScriptSchemaStandardType.Tag)); case TaskParameterValidationType.TagList: return(GetQualifiedTypeName(ScriptSchemaStandardType.TagList)); case TaskParameterValidationType.Target: return(GetQualifiedTypeName(ScriptSchemaStandardType.NameOrTag)); case TaskParameterValidationType.TargetList: return(GetQualifiedTypeName(ScriptSchemaStandardType.NameOrTagList)); } return(null); }
/// <summary> /// Gets the qualified name of the schema type for the given type of validation /// </summary> /// <returns>Qualified name for the corresponding schema type</returns> static XmlQualifiedName GetQualifiedTypeName(TaskParameterValidationType Type) { switch(Type) { case TaskParameterValidationType.Name: return GetQualifiedTypeName(ScriptSchemaStandardType.Name); case TaskParameterValidationType.NameList: return GetQualifiedTypeName(ScriptSchemaStandardType.NameList); case TaskParameterValidationType.Tag: return GetQualifiedTypeName(ScriptSchemaStandardType.Tag); case TaskParameterValidationType.TagList: return GetQualifiedTypeName(ScriptSchemaStandardType.TagList); case TaskParameterValidationType.Target: return GetQualifiedTypeName(ScriptSchemaStandardType.NameOrTag); case TaskParameterValidationType.TargetList: return GetQualifiedTypeName(ScriptSchemaStandardType.NameOrTagList); } return null; }