protected override NetworkStreamModifier[] CreateAndLinkStreamOperators(NetworkStream nsAlice, NetworkStream nsBob) { StreamReplacementOperator sroOperator = new StreamReplacementOperator(nsAlice, nsBob); sroOperator.Encoding = this.Encoding; if (!DataToFind.Equals("")) { sroOperator.ReplacementRule = new StreamReplacementRule(this.Encoding.GetBytes(strDataToFind), this.Encoding.GetBytes(strDataToReplace)); } return(new NetworkStreamModifier[] { sroOperator }); }
public IEnumerable <Profile> FindProfiles([FromBody] DataToFind data) { try { return(_profilesRepository.FindProfiles(data.Tokens).Distinct()); } catch (SqlException exception) { var response = new HttpResponseMessage(HttpStatusCode.NotFound) { Content = new StringContent(exception.Message) }; throw new HttpResponseException(response); } }
public Profile GetProfile([FromBody] DataToFind data) { return(_profilesRepository.GetByLogin(data.Tokens[0])); }