public static SignatureBuilder AcceptanceFor (GroupId groupId ) { return new SignatureBuilder(groupId) .WithStyle(SignatureStyle.ACCEPTANCE) .WithSize(0,0) .AtPosition(0,0) .OnPage(0); }
public List<GroupMember> GetGroupMembers( GroupId groupId ) { List<GroupMember> result = null; Group group = GetGroup(groupId); if (group != null) { result = group.Members; } return result; }
public Group GetGroup( GroupId groupId ) { string path = template.UrlFor (UrlTemplate.GROUPS_ID_PATH) .Replace ("{groupId}", groupId.Id) .Build (); try { string response = restClient.Get(path); Silanis.ESL.API.Group apiGroup = JsonConvert.DeserializeObject<Silanis.ESL.API.Group> (response, settings); Group sdkGroup = new GroupConverter( apiGroup ).ToSDKGroup(); return sdkGroup; } catch (Exception e) { throw new EslException ("Failed to retrieve group." + " Exception: " + e.Message); } }
public GroupMember InviteMember( GroupId groupId, GroupMember groupMember ) { string path = template.UrlFor (UrlTemplate.GROUPS_MEMBER_PATH) .Replace("{groupId}", groupId.Id ) .Build (); Silanis.ESL.API.GroupMember apiGroupMember = new GroupMemberConverter(groupMember).ToAPIGroupMember(); try { string json = JsonConvert.SerializeObject (apiGroupMember, settings); string response = restClient.Post(path, json); Silanis.ESL.API.GroupMember apiResponse = JsonConvert.DeserializeObject<Silanis.ESL.API.GroupMember> (response); return new GroupMemberConverter( apiResponse ).ToSDKGroupMember(); } catch (Exception e) { throw new EslException ("Could not create a new package." + " Exception: " + e.Message); } }
public List<string> GetGroupMemberEmails( GroupId groupId ) { List<string> result = null; Group group = GetGroup(groupId); if (group != null) { result = new List<string>(); foreach (GroupMember groupMember in group.Members) { result.Add(groupMember.Email); } } return result; }
public void NotifySigner( PackageId packageId, GroupId groupId ) { Role role = FindRoleForGroup(packageId, groupId.Id); NotifySigner(packageId, role.Id); }
public static SignatureBuilder SignatureFor( GroupId groupId ) { return new SignatureBuilder(groupId); }
public static SignatureBuilder InitialsFor ( GroupId groupId ) { return new SignatureBuilder(groupId).WithStyle(SignatureStyle.INITIALS); }
private SignatureBuilder(Placeholder roleId) { this.signerEmail = null; this.groupId = null; this.roleId = roleId; }
public string GetEditUrl() { return(ModuleContext.EditUrl("GroupId", GroupId.ToString(), "Edit")); }
private SignerBuilder(GroupId groupId) { this.signerEmail = null; this.groupId = groupId; }
private SignatureBuilder (GroupId groupId ) { this.signerEmail = null; this.groupId = groupId; this.roleId = null; }
private SignerBuilder(string signerEmail) { this.signerEmail = signerEmail; this.groupId = null; }
public static SignerBuilder NewSignerFromGroup(GroupId groupId) { return new SignerBuilder(groupId); }
public Group InviteMember( GroupId groupId, GroupMember groupMember ) { Silanis.ESL.API.GroupMember apiGroupMember = new GroupMemberConverter(groupMember).ToAPIGroupMember(); Silanis.ESL.API.Group apiResponse = apiClient.InviteMember( groupId.Id, apiGroupMember ); return new GroupConverter( apiResponse ).ToSDKGroup(); }
public void DeleteGroup( GroupId groupId ) { apiClient.DeleteGroup(groupId.Id); }
public Group UpdateGroup( Group group, GroupId groupId ) { Silanis.ESL.API.Group apiGroup = new GroupConverter( group ).ToAPIGroup(); apiGroup = apiClient.UpdateGroup( apiGroup, groupId.Id ); Group sdkGroup = new GroupConverter( apiGroup ).ToSDKGroup(); return sdkGroup; }
public Group GetGroup( GroupId groupId ) { Silanis.ESL.API.Group apiGroup = apiClient.GetGroup(groupId.Id); Group sdkGroup = new GroupConverter( apiGroup ).ToSDKGroup(); return sdkGroup; }
public List <Claim> GetAllClaims() { return(Claims.Select(c => new Claim(GroupId.ToString(), c)).ToList()); }
public override int GetHashCode() { return(GroupId.GetHashCode() ^ SiteCollectionId.GetHashCode()); }
public static SignerBuilder NewSignerFromGroup(GroupId groupId) { return(new SignerBuilder(groupId)); }
/// <summary> /// Default constructor /// </summary> /// <param name="id"></param> /// <param name="exists"></param> public Group(GroupId id, bool exists) { Id = id; Exists = exists; }
public static SignatureBuilder CaptureFor (GroupId groupId) { return new SignatureBuilder(groupId).WithStyle(SignatureStyle.HAND_DRAWN); }
public void DeleteGroup( GroupId groupId ) { string path = template.UrlFor (UrlTemplate.GROUPS_ID_PATH) .Replace ("{groupId}", groupId.Id) .Build (); try { restClient.Delete(path); } catch (Exception e) { throw new EslException ("Failed to delete group." + " Exception: " + e.Message); } }
public async Task HandleAsync(SendMessageCommand command) { var group = await _groupRepository.GetAsync(GroupId.From(command.GroupId)) ?? throw new GroupNotFoundException(GroupId.From(command.GroupId)); var channel = await _channelRepository.GetAsync(group.Id, ChannelId.From(command.ChannelId)) ?? throw new ChannelNotFoundException(ChannelId.From(command.ChannelId)); if (await _messageRepository.ExistsAsync(ChannelId.From(command.ChannelId), MessageId.From(command.MessageId))) { throw new MessageAlreadyExistsException(command.MessageId); } var message = group.SendMessage(UserId.From(command.UserId), channel, MessageId.From(command.MessageId), MessageContent.Create(command.Content), _clock); await _messageRepository.AddAsync(message); }