Jaa


GetSharingMetadataType Class

The GetSharingMetadataType class represents a request to get an opaque authentication token that identifies the sharing invitation.

Inheritance Hierarchy

System.Object
  ExchangeWebServices.BaseRequestType
    ExchangeWebServices.GetSharingMetadataType

Namespace:  ExchangeWebServices
Assembly:  EWS (in EWS.dll)

Syntax

'Declaration
<SerializableAttribute> _
Public Class GetSharingMetadataType _
    Inherits BaseRequestType
'Usage
Dim instance As GetSharingMetadataType
[SerializableAttribute]
public class GetSharingMetadataType : BaseRequestType

Examples

The following code example shows you how to get an opaque authentication token that identifies a sharing invitation. In this example, user1@contoso.com wants to share its contacts folder with user1@fabikam.com and user2@test.com. IdOfContactsFolder represents the FolderIdType object that corresponds to the contacts folder of user1@contoso.com.

static void GetSharingMetadataTest(ExchangeServiceBinding esb)
{
    // Create the sharing request.
    GetSharingMetadataType gsmRequest = new GetSharingMetadataType();
    
    // Specify the identifier of the folder to be shared.
    gsmRequest.IdOfFolderToShare = IdOfContactsFolder;

    // Specify the sender of the request and the intended recipients.
    gsmRequest.SenderSmtpAddress = "user1@contoso.com";
    gsmRequest.Recipients = new string[] { "user1@fabrikam.com", "user2@test.com" };
    
    try
    {
      // Submit the request and get the response.
      GetSharingMetadataResponseMessageType gsmResponse = esb.GetSharingMetadata(gsmRequest);
    }
    catch (Exception e)
    {
      Console.WriteLine(e.Message);
    }
}

Thread Safety

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