/// <summary> /// Creates a clone of this instance. /// </summary> /// <returns> /// A new object that is a copy of this instance. /// </returns> public object Clone() { HandlerConfiguration clone = DoClone(); clone._assembly = _assembly; return(clone); }
/// <summary> /// Creates a clone of this instance. /// </summary> /// <returns>A clone of the instance.</returns> protected override ConfigurationElement DoClone() { CodeConfiguration clone = new CodeConfiguration(); clone._encoding = Encoding.Clone() as EncodingConfiguration; clone._formatting = Formatting.Clone() as FormattingConfiguration; foreach (HandlerConfiguration handler in Handlers) { HandlerConfiguration handlerClone = handler.Clone() as HandlerConfiguration; clone.Handlers.Add(handlerClone); } return(clone); }