| | | 1 | | // Licensed to the .NET Foundation under one or more agreements. |
| | | 2 | | // The .NET Foundation licenses this file to you under the MIT license. |
| | | 3 | | |
| | | 4 | | using System.Configuration; |
| | | 5 | | using System.Security.Permissions; |
| | | 6 | | using System.Xml; |
| | | 7 | | |
| | | 8 | | namespace CoreWCF.Configuration |
| | | 9 | | { |
| | | 10 | | public abstract class ServiceModelExtensionElement : ServiceModelConfigurationElement |
| | | 11 | | { |
| | 34 | 12 | | public string ExtensionCollectionName { get; protected internal set; } |
| | 34 | 13 | | public string ConfigurationElementName { get; protected internal set; } |
| | | 14 | | |
| | | 15 | | internal void InternalInitializeDefault() |
| | | 16 | | { |
| | 17 | 17 | | InitializeDefault(); |
| | 17 | 18 | | } |
| | | 19 | | |
| | | 20 | | public virtual void CopyFrom(ServiceModelExtensionElement from) |
| | | 21 | | { |
| | 0 | 22 | | if (IsReadOnly()) |
| | | 23 | | { |
| | 0 | 24 | | throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new ConfigurationErrorsException(string.Format |
| | | 25 | | } |
| | 0 | 26 | | if (from == null) |
| | | 27 | | { |
| | 0 | 28 | | throw DiagnosticUtility.ExceptionUtility.ThrowHelperArgumentNull(nameof(from)); |
| | | 29 | | } |
| | 0 | 30 | | } |
| | | 31 | | |
| | | 32 | | internal void DeserializeInternal(XmlReader reader, bool serializeCollectionKey) |
| | | 33 | | { |
| | 17 | 34 | | DeserializeElement(reader, serializeCollectionKey); |
| | 17 | 35 | | } |
| | | 36 | | |
| | | 37 | | internal bool IsModifiedInternal() |
| | | 38 | | { |
| | 0 | 39 | | return IsModified(); |
| | | 40 | | } |
| | | 41 | | |
| | | 42 | | internal void ResetModifiedInternal() |
| | | 43 | | { |
| | 17 | 44 | | ResetModified(); |
| | 17 | 45 | | } |
| | | 46 | | |
| | | 47 | | internal void SetReadOnlyInternal() |
| | | 48 | | { |
| | 0 | 49 | | SetReadOnly(); |
| | 0 | 50 | | } |
| | | 51 | | } |
| | | 52 | | } |