Here are the examples of the csharp api class Adxstudio.Xrm.SharePoint.OrganizationServiceContextExtensions.GetDocumentLocationUrl(System.Collections.Generic.IEnumerable) taken from open source projects. By voting up you can indicate which examples are most useful and appropriate.
1 Example
0
1. Example
Project: xRM-Portals-Community-Edition
Source File: OrganizationServiceContextExtensions.cs
Source File: OrganizationServiceContextExtensions.cs
public static Uri GetDocumentLocationUrl(this OrganizationServiceContext context, Entity entity) { if (entity == null) throw new ArgumentNullException("entity"); entity.AssertEntityName(_sharepointsite, _sharepointdocumentlocation); // if the entity is a SharePoint site, just return the absolute URL if (entity.LogicalName == _sharepointsite) { var absoluteUrl = entity.GetAttributeValue<string>("absoluteurl"); return new Uri(absoluteUrl); } // if the entity is a document location with an absolute URL, just return the absolute URL if (entity.LogicalName == _sharepointdocumentlocation) { var absoluteUrl = entity.GetAttributeValue<string>("absoluteurl"); if (!string.IsNullOrWhiteSpace(absoluteUrl)) return new Uri(absoluteUrl); } var path = GetDocumentLocationPath(context, entity); return GetDocumentLocationUrl(path); }