private Uri CreateOutOfBrowserQueryUri(Uri baseWebServerUri, DocumentReference serverRoot, DocumentReference xapBuildDeployedFullPath) { if (serverRoot == (DocumentReference)null || xapBuildDeployedFullPath == (DocumentReference)null) { return((Uri)null); } return(new Uri(baseWebServerUri, serverRoot.GetRelativePath(xapBuildDeployedFullPath))); }
private string GetRelativePathForDocumentReference(DocumentReference referencingDocument) { string str = this.resourceItem.ProjectRelativeDocumentReference.TrimStart(Microsoft.Expression.Framework.Documents.PathHelper.GetDirectorySeparatorCharacters()); DocumentReference documentReference = null; if (!Microsoft.Expression.Framework.Documents.PathHelper.IsValidPath(str)) { return(null); } documentReference = DocumentReference.Create(Microsoft.Expression.Framework.Documents.PathHelper.ResolveCombinedPath(this.resourceItem.Project.ProjectRoot.Path, str)); return(referencingDocument.GetRelativePath(documentReference)); }
private static string AdjustTargetFolder(string targetFolder, string rootSourcePath, string fullSourcePath) { string directoryNameOrRoot = Microsoft.Expression.Framework.Documents.PathHelper.GetDirectoryNameOrRoot(fullSourcePath); DocumentReference documentReference = DocumentReference.Create(rootSourcePath); DocumentReference documentReference1 = DocumentReference.Create(directoryNameOrRoot); return(Microsoft.Expression.Framework.Documents.PathHelper.ResolveCombinedPath(targetFolder, documentReference.GetRelativePath(documentReference1))); }