示例#1
0
        public object Clone()
        {
            RuleDeclaration rd = new RuleDeclaration();

            rd.Id = Id;
            rd.ParentDeclaration = ParentDeclaration;
            rd.Name        = (Name != null) ? Name.Clone() as string : null;
            rd.Description = (Description != null) ? Description.Clone() as string : null;
            rd.Severity    = Severity;
            rd.Expression  = (Expression != null) ? Expression.Clone() as string : null;
            rd.Languages   = Languages.ToDictionary(pair => pair.Key, pair => pair.Value.Clone() as ILanguageDeclaration);

            return(rd);
        }
示例#2
0
        public object Clone()
        {
            RuleDeclaration rd = new RuleDeclaration();

              rd.Id                = Id;
              rd.ParentDeclaration = ParentDeclaration;
              rd.Name              = (Name != null) ? Name.Clone() as string : null;
              rd.Description       = (Description != null) ? Description.Clone() as string : null;
              rd.Severity          = Severity;
              rd.Expression        = (Expression != null) ? Expression.Clone() as string : null;
              rd.Languages         = Languages.ToDictionary(pair => pair.Key, pair => pair.Value.Clone() as ILanguageDeclaration);

              return rd;
        }