protected virtual IRecordInterface CopyFromImpl()

in messages/csharp/src/Deltix.Timebase.Messages/EPAM.Deltix.Timebase.Messages.Schema/SchemaFieldChangeAction.cs [320:376]


        protected virtual IRecordInterface CopyFromImpl(IRecordInfo source)
        {
            if (typeof(ISchemaFieldChangeActionInfo).IsInstanceOfType(source))
            {
                ISchemaFieldChangeActionInfo typedSource = ((ISchemaFieldChangeActionInfo)(source));
                if ((typedSource.PreviousState != null))
                {
                    if (((this.PreviousState == null) 
                                || (this.PreviousState.GetType() == typedSource.PreviousState.GetType())))
                    {
                        this.PreviousState = ((DataField)(typedSource.PreviousState.Clone()));
                    }
                    else
                    {
                        this.PreviousState.CopyFrom(typedSource.PreviousState);
                    }
                }
                else
                {
                    this.PreviousState = null;
                }
                if ((typedSource.NewState != null))
                {
                    if (((this.NewState == null) 
                                || (this.NewState.GetType() == typedSource.NewState.GetType())))
                    {
                        this.NewState = ((DataField)(typedSource.NewState.Clone()));
                    }
                    else
                    {
                        this.NewState.CopyFrom(typedSource.NewState);
                    }
                }
                else
                {
                    this.NewState = null;
                }
                this.ChangeTypes = typedSource.ChangeTypes;
                if ((typedSource.DataTransformation != null))
                {
                    if (((this.DataTransformation == null) 
                                || (this.DataTransformation.GetType() == typedSource.DataTransformation.GetType())))
                    {
                        this.DataTransformation = ((SchemaFieldDataTransformation)(typedSource.DataTransformation.Clone()));
                    }
                    else
                    {
                        this.DataTransformation.CopyFrom(typedSource.DataTransformation);
                    }
                }
                else
                {
                    this.DataTransformation = null;
                }
            }
            return this;
        }