Exemplo n.º 1
0
        public object Clone()
        {
            var cl = (DataRecord)MemberwiseClone();

            cl.data = (Dictionary <string, object>)CloneUtils.deepClone(data);
            return(cl);
        }
Exemplo n.º 2
0
            public object Clone()
            {
                var copy = (CorrectSuperComplexClass)MemberwiseClone();

                copy.objectField = (CorrectComplexClass)CloneUtils.deepClone(objectField);
                return(copy);
            }
Exemplo n.º 3
0
        public object Clone()
        {
            var cl = (Data)MemberwiseClone();

            cl.preview = (byte[])CloneUtils.deepClone(preview);
            cl.data    = (byte[])CloneUtils.deepClone(data);
            return(cl);
        }
Exemplo n.º 4
0
 public object Clone()
 {
     try
     {
         var clone = (Event)this.MemberwiseClone();
         clone.acknowledgements = (AgList <Acknowledgement>)CloneUtils.deepClone(this.acknowledgements);
         //clone.enrichments = (AgList)CloneUtils.deepClone(enrichments);
         return(clone);
     }
     catch (CloneNotSupportedException ex)
     {
         throw new InvalidOperationException(string.Empty, ex);
     }
 }
Exemplo n.º 5
0
        public object Clone()
        {
            var cl = (DataTable)this.MemberwiseClone();

            cl.format  = this.format.Clone() as TableFormat;
            cl.records = (List <DataRecord>)CloneUtils.deepClone(this.records);

            foreach (var rec in cl.records)
            {
                rec.setTable(cl);
            }

            return(cl);
        }
Exemplo n.º 6
0
        // TODO: Resync with Java, may (surely?) missing some (new) fields
        public object Clone()
        {
            FieldFormat cl;

            try
            {
                cl = (FieldFormat)this.MemberwiseClone();
            }
            catch (CloneNotSupportedException ex)
            {
                throw new InvalidOperationException(ex.Message, ex);
            }

            cl.defaultValue    = CloneUtils.genericClone(this.getDefaultValue());
            cl.selectionValues = (AgDictionary <NullableObject, string>)CloneUtils.deepClone(this.selectionValues);
            cl.validators      = (AgList <FieldValidator>)CloneUtils.deepClone(this.validators);

            cl.immutable = false;

            return(cl);
        }
Exemplo n.º 7
0
        public object Clone()
        {
            TableFormat cl;

            try
            {
                cl = (TableFormat)this.MemberwiseClone();
            }
            catch (CloneNotSupportedException ex)
            {
                throw new InvalidOperationException(ex.Message, ex);
            }

            cl.fields           = (List <FieldFormat>)CloneUtils.deepClone(fields);
            cl.recordValidators = (List <RecordValidator>)CloneUtils.deepClone(recordValidators);
            cl.tableValidators  = (List <TableValidator>)CloneUtils.deepClone(tableValidators);

            cl.id        = null; // Need to clear ID to avoid conflicts in format cache
            cl.immutable = false;

            return(cl);
        }
Exemplo n.º 8
0
        public object getDefaultValueCopy()
        {
            var def = this.getDefaultValue();

            return(def == null ? null : CloneUtils.deepClone(def));
        }