public override void CopyFrom(ServiceModelExtensionElement from)
        {
            base.CopyFrom(from);
            ServiceSecurityAuditElement element = (ServiceSecurityAuditElement)from;

            this.AuditLogLocation                = element.AuditLogLocation;
            this.SuppressAuditFailure            = element.SuppressAuditFailure;
            this.ServiceAuthorizationAuditLevel  = element.ServiceAuthorizationAuditLevel;
            this.MessageAuthenticationAuditLevel = element.MessageAuthenticationAuditLevel;
        }
        public override void CopyFrom(ServiceModelExtensionElement from)
        {
            base.CopyFrom(from);
            ServiceSecurityAuditElement source = (ServiceSecurityAuditElement)from;

#pragma warning suppress 56506 //Microsoft; base.CopyFrom() checks for 'from' being null
            this.AuditLogLocation                = source.AuditLogLocation;
            this.SuppressAuditFailure            = source.SuppressAuditFailure;
            this.ServiceAuthorizationAuditLevel  = source.ServiceAuthorizationAuditLevel;
            this.MessageAuthenticationAuditLevel = source.MessageAuthenticationAuditLevel;
        }
Exemplo n.º 3
0
		public void ServiceSecurityAuditElement_defaults () {
			ServiceSecurityAuditElement element = new ServiceSecurityAuditElement ();

			Assert.AreEqual (typeof (ServiceSecurityAuditBehavior), element.BehaviorType, "BehaviorType");
			Assert.AreEqual ("serviceSecurityAudit", element.ConfigurationElementName, "ConfigurationElementName");

			Assert.AreEqual (AuditLogLocation.Default, element.AuditLogLocation, "AuditLogLocation");
			Assert.AreEqual (true, element.SuppressAuditFailure, "SuppressAuditFailure");
			Assert.AreEqual (AuditLevel.None, element.ServiceAuthorizationAuditLevel, "ServiceAuthorizationAuditLevel");
			Assert.AreEqual (AuditLevel.None, element.MessageAuthenticationAuditLevel, "MessageAuthenticationAuditLevel");
		}