ShareFactoryFindById Method |
Namespace: AskiaPortalCmn
Find the share using his id
var context = ContextFactory.CreateByUserGuid(Guid.Parse("20BE5F84-F006-49A0-9674-4B16A090AF2D")); var contextValidation = context.Validate(); if (!contextValidation.Success) { throw contextValidation.Exception; } var share = ShareFactory.FindById(context, 2); if (share != null) { Console.WriteLine("Share Id={0} was found, ObjectType: {1}, ObjectId: {2}", share.Id, share.ObjectType, share.ObjectId); } else { Console.WriteLine("The specified share doesn't exist, or the current user within the context could not access it"); }