Exemplo n.º 1
0
		public static string GetListUrl(string url, Proxy.NavigatorRef.Navigator navigator)
		{
			Proxy.NavigatorRef.Item item = navigator.GetItem(url);

			switch (item.Kind)
			{
			case Workshare.Connect.SharePoint.Proxy.NavigatorRef.ItemKind.DocumentLibrary:
			case Workshare.Connect.SharePoint.Proxy.NavigatorRef.ItemKind.File:
			case Workshare.Connect.SharePoint.Proxy.NavigatorRef.ItemKind.Folder:
				{
					return GetListUrl(ShrinkUrl(url), navigator);
				}
			case Workshare.Connect.SharePoint.Proxy.NavigatorRef.ItemKind.WebSite:
			default:
				{
					return url;
				}
			}
		}
Exemplo n.º 2
0
		public static string GetLibraryName(string url, Proxy.NavigatorRef.Navigator navigator)
		{
			Proxy.NavigatorRef.Item item = navigator.GetItem(url);

			switch (item.Kind)
			{
			case Workshare.Connect.SharePoint.Proxy.NavigatorRef.ItemKind.File:
			case Workshare.Connect.SharePoint.Proxy.NavigatorRef.ItemKind.Folder:
				{
					return GetLibraryName(ShrinkUrl(url), navigator);
				}
			case Workshare.Connect.SharePoint.Proxy.NavigatorRef.ItemKind.DocumentLibrary:
				{
					Uri uri = new Uri(url);
					string[] segments = uri.Segments;
					return segments[segments.Length - 1];
				}
			case Workshare.Connect.SharePoint.Proxy.NavigatorRef.ItemKind.WebSite:
			default:
				{
					return "";
				}
			}
		}