Exemplo n.º 1
0
        public object Clone()
        {
            CategoryDeclaration cd = new CategoryDeclaration();
              cd.Id = Id;
              cd.Name = (Name != null) ? (string) Name.Clone() : null;
              cd.Description = (Description != null) ? (string) Description.Clone() : null;

              foreach (KeyValuePair<int, IRuleDeclaration> valuePair in Rules)
              {
            cd.Rules.Add(valuePair.Key, valuePair.Value.Clone() as IRuleDeclaration);
              }
              return cd;
        }
Exemplo n.º 2
0
        public object Clone()
        {
            CategoryDeclaration cd = new CategoryDeclaration();

            cd.Id          = Id;
            cd.Name        = (Name != null) ? (string)Name.Clone() : null;
            cd.Description = (Description != null) ? (string)Description.Clone() : null;

            foreach (KeyValuePair <int, IRuleDeclaration> valuePair in Rules)
            {
                cd.Rules.Add(valuePair.Key, valuePair.Value.Clone() as IRuleDeclaration);
            }
            return(cd);
        }