public static GetFieldInfo ( |
||
type | ||
return | FieldInfo |
public override Field CopyField() { var fldinfo = InfoProvider.GetFieldInfo(GetType()); var other = fldinfo.CreateInstance(); var compinfo = InfoProvider.GetCompoundInfo(GetType()); compinfo.Copy(this, other); return(other); }
public Compound() { // Initialize fields that should not be null var members = InfoProvider.GetCompoundInfo(GetType()).Members; foreach (var meminfo in members.Values.Distinct().Where(m => m.Initialize)) { if (meminfo.IsListType) { // Instantiate list field meminfo.EnsureListCreated(this); } else if (!meminfo.IsPrimitiveType) { // Instantiate complex fields var fieldinfo = InfoProvider.GetFieldInfo(meminfo.FieldType); meminfo.SetValue(this, fieldinfo.CreateInstance()); } } }