public ShareTo ( long objectId, IEnumerable |
||
objectId | long | the Id of the object |
shares | IEnumerable |
the share objects |
sendEmail | bool | (optional): Either true or false to indicate whether or not /// to notify the user by email. Default is false. |
리턴 | IList |
public virtual IList<Share> ShareTo(long objectId, IEnumerable<Share> shares, bool? sendEmail)
{
StringBuilder path = new StringBuilder(MasterResourceType + "/" + objectId + "/shares");
if (sendEmail != null)
{
path.Append("?sendEmail=" + sendEmail.ToString().ToLower());
}
return this.PostAndReceiveList<IEnumerable<Share>, Share>(path.ToString(), shares, typeof(Share));
}
public virtual void TestShareToLongShare() { server.setResponseBody("../../../TestSDK/resources/shareToOne.json"); Share share = new Share(); share.Email = "*****@*****.**"; share.AccessLevel = AccessLevel.ADMIN; shareResourcesImpl.ShareTo(1234L, share); Assert.AreEqual("*****@*****.**", share.Email); Assert.AreEqual(AccessLevel.ADMIN, share.AccessLevel); }