AzurePoolCrossDbGenerator/Configs.cs
/// <summary>
/// Make a clone of the current instance.
/// </summary>
/// <returns></returns>
Make a clone of the current instance.
Make a clone of the current instance .
public GenericConfigEntry Clone()
            {
                Type myType = this.GetType();
                FieldInfo[] myField = myType.GetFields();
                GenericConfigEntry newCopy = (GenericConfigEntry)Activator.CreateInstance(myType);
                foreach (var field in myField)
                {
                    string name = field.Name;
                    string value = (string)myType.GetField(name).GetValue(this);
                    myType.GetField(name).SetValue(newCopy, value);
                }
                return newCopy;
            }
public GenericConfigEntry Clone ( ) { Type myType = this . GetType ( ) ; FieldInfo [ ] myField = myType . GetFields ( ) ; GenericConfigEntry newCopy = ( GenericConfigEntry ) Activator . CreateInstance ( myType ) ; foreach ( var field in myField ) { string name = field . Name ; string value = ( string ) myType . GetField ( name ) . GetValue ( this ) ; myType . GetField ( name ) . SetValue ( newCopy , value ) ; } return newCopy ; }
Make a clone of the current instance.
Make a clone of the current instance .
// get list of public fields // a new copy for the clone // copy values on those with missing values
None