private static string ShareSheet(SmartsheetClient smartsheet, long sheetId, Share share) { string sheetShareId = smartsheet.SheetResources.ShareResources.ShareTo(sheetId, new Share[] { share }, true)[0].Id; return sheetShareId; }
private static string ShareWorkspace(SmartsheetClient smartsheet, long workspaceId, Share share) { string workspaceShareId = smartsheet.WorkspaceResources.ShareResources.ShareTo(workspaceId, new Share[] { share }, true)[0].Id; return workspaceShareId; }
/// <summary> /// Builds the <seealso cref="Share"/> object. /// </summary> /// <returns> the share </returns> public virtual Share Build() { //if (accessLevel == null) //{ // throw new InvalidOperationException("The access level must be specified."); //} Share share = new Share(); share.id = shareId; share.accessLevel = accessLevel; return share; }