示例#1
0
        public Components Clone()
        {
            var clone = new Components();

            clone.Schemas           = Schemas.ToDictionary(p => p.Key, p => p.Value);
            clone.Messages          = Messages.ToDictionary(p => p.Key, p => p.Value);
            clone.SecuritySchemes   = SecuritySchemes.ToDictionary(p => p.Key, p => p.Value);
            clone.Parameters        = Parameters.ToDictionary(p => p.Key, p => p.Value);
            clone.CorrelationIds    = CorrelationIds.ToDictionary(p => p.Key, p => p.Value);
            clone.ServerBindings    = ServerBindings.ToDictionary(p => p.Key, p => p.Value);
            clone.ChannelBindings   = ChannelBindings.ToDictionary(p => p.Key, p => p.Value);
            clone.OperationBindings = OperationBindings.ToDictionary(p => p.Key, p => p.Value);
            clone.MessageBindings   = MessageBindings.ToDictionary(p => p.Key, p => p.Value);
            clone.OperationTraits   = OperationTraits.ToDictionary(p => p.Key, p => p.Value);
            clone.MessageTraits     = MessageTraits.ToDictionary(p => p.Key, p => p.Value);

            return(clone);
        }