Skip to content

Other extensions

Artem Grunin edited this page Dec 30, 2024 · 4 revisions

OrganizationServiceFault Extensions

GetErrorCode

Introduced in version 2.2.0

Converts OrganizatioService fault`s ErrorCode to ErrorCodes enumeration value

public ErrorCodes? GetErrorCode();

ErrorCodes is generated from original documentation from Microsoft. You can also check PowerShell script if you want to generate your own code.

ExecuteMultipleResponse Extensions

GetFaultedResponses

Introduced in version 2.2.0

Returns collection of faulted ExecuteMultipleResponseItems

public ExecuteMultipleResponseItemCollection GetFaultedResponses();

ThrowIfFaulted

Introduced in version 2.2.0

Throws AggregateException that contains faults from related ExecuteMultipleResponseItems

public void ThrowIfFaulted();

ExecuteMultipleResponseItem Extensions

IsFaulted

Introduced in version 2.2.0

Checks if this ExecuteMultipleResponseItem if contains a fault

public bool IsFaulted();

GetFaultException

Introduced in version 2.2.0

Creates FaultException from this ExecuteMultipleResponseItem`s fault

public FaultException<OrganizationServiceFault> GetFaultException();

ThrowIfFaulted

Introduced in version 2.2.0

Throws a FaultException if this ExecuteMultipleResponseItem if contains a fault

public void ThrowIfFaulted();

EntityImageCollection Extensions

GetImage

Introduced in version 2.2.0

Safely gets value from EntityImageCollection

public Entity GetImage(string name);

GetImage<T>

Introduced in version 2.2.0

Safely gets value from EntityImageCollection

public T GetImage<T>(string name) where T : Entity;

EntityCollection Extensions

Introduced in version 2.3.0 Methods below supports only ActivityParty collections

ContainsAddress

Checks if ActivityParty list contains email address

public bool ContainsAddress(string addressUsed)

GetPartiesInDomain

Returns members of ActivityParty list whose email address refers to required domain

public EntityCollection GetPartiesInDomain(string addressUsedDomain)

GetPartiesNotInDomain

Returns members of ActivityParty list whose email address refers DON'T to required domain

public EntityCollection GetPartiesNotInDomain(string addressUsedDomain)