ContractDescription.HasProtectionLevel Property

 

Gets a value that indicates whether the contract has had a protection level set.

Namespace:   System.ServiceModel.Description
Assembly:  System.ServiceModel (in System.ServiceModel.dll)

public bool HasProtectionLevel { get; }

Property Value

Type: System.Boolean

true if the protection level has been set; otherwise, false.

When the ProtectionLevel is set, the HasProtectionLevel property is set to true.

bool hasProtectionLevel = cd.HasProtectionLevel;
if (hasProtectionLevel)
{
    ProtectionLevel protectionLevel = cd.ProtectionLevel;
    Console.WriteLine("\tProtection Level: {0}", protectionLevel.ToString());
}

.NET Framework
Available since 3.0
Return to top
Show: