System.IO.Pipes.UnixNamedPipe.RightsToAccess C# (CSharp) Méthode

RightsToAccess() protected méthode

protected RightsToAccess ( PipeAccessRights rights ) : string
rights PipeAccessRights
Résultat string
		protected string RightsToAccess (PipeAccessRights rights)
		{
			string access = null;
			if ((rights & PipeAccessRights.ReadData) != 0) {
				if ((rights & PipeAccessRights.WriteData) != 0)
					access = "r+";
				else
					access = "r";
			}
			else if ((rights & PipeAccessRights.WriteData) != 0)
				access = "w";
			else
				throw new InvalidOperationException ("The pipe must be opened to either read or write");

			return access;
		}