ContentUser Class

 

Represents a user or user-group for granting access to rights managed content.

Namespace:   System.Security.RightsManagement
Assembly:  WindowsBase (in WindowsBase.dll)

System.Object
  System.Security.RightsManagement.ContentUser

[SecurityCriticalAttribute(SecurityCriticalScope.Everything)]
public class ContentUser

NameDescription
System_CAPS_pubmethodContentUser(String, AuthenticationType)

Initializes a new instance of the ContentUser class.

NameDescription
System_CAPS_pubpropertySystem_CAPS_staticAnyoneUser

Gets an instance of the "Anyone" ContentUser persona.

System_CAPS_pubpropertyAuthenticationType

Gets the AuthenticationType specified to the ContentUser constructor.

System_CAPS_pubpropertyName

Gets the user or group name specified to the ContentUser constructor.

System_CAPS_pubpropertySystem_CAPS_staticOwnerUser

Gets an instance of the "Owner" ContentUser persona.

NameDescription
System_CAPS_pubmethodEquals(Object)

Returns a value that indicates whether this ContentUser is equivalent to another given instance.(Overrides Object.Equals(Object).)

System_CAPS_protmethodFinalize()

Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.(Inherited from Object.)

System_CAPS_pubmethodGetHashCode()

Returns a computed hash code based on the user Name and AuthenticationType.(Overrides Object.GetHashCode().)

System_CAPS_pubmethodGetType()

Gets the Type of the current instance.(Inherited from Object.)

System_CAPS_pubmethodIsAuthenticated()

Returns a value that indicates whether the user is currently authenticated.

System_CAPS_protmethodMemberwiseClone()

Creates a shallow copy of the current Object.(Inherited from Object.)

System_CAPS_pubmethodToString()

Returns a string that represents the current object.(Inherited from Object.)

As with other System.Security.RightsManagement types, ContentUser is only usable in full trust applications.

The following example shows how to use Owner property to assign a variable of this type.

WriteStatus("   Reading '" + xrmlFilename + "' permissions.");
try
{
    StreamReader sr = File.OpenText(xrmlFile);
    xrmlString = sr.ReadToEnd();
}
catch (Exception ex)
{
    MessageBox.Show("ERROR: '"+xrmlFilename+"' open failed.\n"+
        "Exception: " + ex.Message, "XrML File Error",
        MessageBoxButton.OK, MessageBoxImage.Error);
    return false;
}

WriteStatus("   Building UnsignedPublishLicense");
WriteStatus("       from '" + xrmlFilename + "'.");
UnsignedPublishLicense unsignedLicense =
    new UnsignedPublishLicense(xrmlString);
ContentUser author = unsignedLicense.Owner;

.NET Framework
Available since 3.0

Any public static ( Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Return to top
Show: