public override void CopyFrom(ServiceModelExtensionElement from) { base.CopyFrom(from); ServiceAuthorizationElement element = (ServiceAuthorizationElement)from; this.PrincipalPermissionMode = element.PrincipalPermissionMode; this.RoleProviderName = element.RoleProviderName; this.ImpersonateCallerForAllOperations = element.ImpersonateCallerForAllOperations; this.ServiceAuthorizationManagerType = element.ServiceAuthorizationManagerType; AuthorizationPolicyTypeElementCollection authorizationPolicies = element.AuthorizationPolicies; AuthorizationPolicyTypeElementCollection elements2 = this.AuthorizationPolicies; for (int i = 0; i < authorizationPolicies.Count; i++) { elements2.Add(authorizationPolicies[i]); } }
public override void CopyFrom(ServiceModelExtensionElement from) { base.CopyFrom(from); ServiceAuthorizationElement source = (ServiceAuthorizationElement)from; #pragma warning suppress 56506 //Microsoft; base.CopyFrom() checks for 'from' being null this.PrincipalPermissionMode = source.PrincipalPermissionMode; this.RoleProviderName = source.RoleProviderName; this.ImpersonateCallerForAllOperations = source.ImpersonateCallerForAllOperations; this.ImpersonateOnSerializingReply = source.ImpersonateOnSerializingReply; this.ServiceAuthorizationManagerType = source.ServiceAuthorizationManagerType; AuthorizationPolicyTypeElementCollection srcAuthorizationPolicies = source.AuthorizationPolicies; AuthorizationPolicyTypeElementCollection dstAuthorizationPolicies = this.AuthorizationPolicies; for (int i = 0; i < srcAuthorizationPolicies.Count; ++i) { dstAuthorizationPolicies.Add(srcAuthorizationPolicies[i]); } }