private static CustomAttributeTypedArgument MakeTypedArgument(System.Reflection.CustomAttributeTypedArgument a) { var argumentType = (TypeImpl)a.ArgumentType; if (!argumentType.IsArray) { return(new CustomAttributeTypedArgument(argumentType, a.Value)); } var reflectionValue = (ReadOnlyCollection <System.Reflection.CustomAttributeTypedArgument>)a.Value; var lmrValue = new ReadOnlyCollection <CustomAttributeTypedArgument>(reflectionValue.Select(MakeTypedArgument).ToList()); return(new CustomAttributeTypedArgument(argumentType, lmrValue)); }
public void setAttribute(string name, System.Reflection.CustomAttributeTypedArgument attr) { if (attr.ArgumentType.Equals(typeof(AccessTypes))) { AccessType = (AccessTypes)attr.Value; } else if (attr.ArgumentType.Equals(typeof(ColumnTypes))) { ColumnType = (ColumnTypes)attr.Value; } else if (attr.ArgumentType.Equals(typeof(System.Data.DbType))) { DbType = (System.Data.DbType)attr.Value; } else if (name == "ColumnName") { Name = (string)attr.Value; } }
public CustomAttributeTypedArgument(System.Reflection.CustomAttributeTypedArgument arg) { this.ArgumentType = arg.ArgumentType.FullName; this.Value = arg.Value.ToString(); }