ShareFactoryFindAll Method |
Namespace: AskiaPortalCmn
Find all shares available for the specified user and object type.
var context = ContextFactory.CreateByUserGuid(Guid.Parse("20BE5F84-F006-49A0-9674-4B16A090AF2D")); var contextValidation = context.Validate(); if (!contextValidation.Success) { throw contextValidation.Exception; } var shares = ShareFactory.FindAll(context, new ShareQueryFilter { User = context.User, ObjectType = "some-type" }); foreach(IShare share in shares) { Console.WriteLine($"Share Id={share.Id}: {share.ObjectId}"); }
Find all shares available for the specified object.
var context = ContextFactory.CreateByUserGuid(Guid.Parse("20BE5F84-F006-49A0-9674-4B16A090AF2D")); var contextValidation = context.Validate(); if (!contextValidation.Success) { throw contextValidation.Exception; } var shares = ShareFactory.FindAll(context, new ShareQueryFilter { ObjectType = "some-type", OBjectId = 3 }); foreach(IShare share in shares) { Console.WriteLine($"Share Id={share.Id}: {share.ObjectId}"); }