public UncPath(ServerName remoteServer, ShareName shareName, SubDirectory subDirectory, SubDirectory subSubDirectory) { _remoteServer = remoteServer; _shareName = shareName; _subDirectory = subDirectory; _subSubDirectory = subSubDirectory; }
public string BuildUncPath() { if (RemoteServer == null || ShareName == null) { throw new ShareException(string.Format("Cannot build Unc path as either server {0} or share {1} is not set", _remoteServer, _shareName)); } string returnValue = "\\\\" + RemoteServer.ToString() + "\\" + ShareName.ToString(); if (SubDirectory != null) { returnValue += "\\" + SubDirectory.ToString(); } if (SubSubDirectory != null) { returnValue += "\\" + SubSubDirectory.ToString(); } return(returnValue); }