예제 #1
0
        public static IServiceCollection AddSafirAgentClient(
            this IServiceCollection services,
            string name,
            Action <GrpcClientFactoryOptions> configureClient)
        {
            services.AddWrappers();
            services.AddGrpcClient <FileSystem.FileSystemClient>(ClientName.FileSystem(name), configureClient);
            services.AddGrpcClient <Host.HostClient>(ClientName.Host(name), configureClient);

            return(services);
        }
예제 #2
0
        public override bool Equals(object obj)
        {
            var other = obj as ClientModel;

            if (other == null)
            {
                return(false);
            }

            var result =
                AbsoluteRefreshTokenLifetime.SafeEquals(other.AbsoluteRefreshTokenLifetime) &&
                AccessTokenLifetime.SafeEquals(other.AccessTokenLifetime) &&
                AccessTokenType.SafeEquals(other.AccessTokenType) &&
                AllowAccessTokensViaBrowser.SafeEquals(other.AllowAccessTokensViaBrowser) &&
                AllowedCorsOrigins.SafeListEquals(other.AllowedCorsOrigins) &&
                AllowedGrantTypes.SafeListEquals(other.AllowedGrantTypes) &&
                AllowedScopes.SafeListEquals(other.AllowedScopes) &&
                AllowOfflineAccess.SafeEquals(other.AllowOfflineAccess) &&
                AllowPlainTextPkce.SafeEquals(other.AllowPlainTextPkce) &&
                AllowRememberConsent.SafeEquals(other.AllowRememberConsent) &&
                AlwaysSendClientClaims.SafeEquals(other.AlwaysSendClientClaims) &&
                AuthorizationCodeLifetime.SafeEquals(other.AuthorizationCodeLifetime) &&
                BackChannelLogoutSessionRequired.SafeEquals(other.BackChannelLogoutSessionRequired) &&
                BackChannelLogoutUri.SafeEquals(other.BackChannelLogoutUri) &&
                Claims.SafeListEquals(other.Claims) &&
                ClientId.SafeEquals(other.ClientId) &&
                ClientName.SafeEquals(other.ClientName) &&
                ClientSecrets.SafeListEquals(other.ClientSecrets) &&
                ClientUri.SafeEquals(other.ClientUri) &&
                ConsentLifetime.SafeEquals(other.ConsentLifetime) &&
                Enabled.SafeEquals(other.Enabled) &&
                EnableLocalLogin.SafeEquals(other.EnableLocalLogin) &&
                FrontChannelLogoutSessionRequired.SafeEquals(other.FrontChannelLogoutSessionRequired) &&
                FrontChannelLogoutUri.SafeEquals(other.FrontChannelLogoutUri) &&
                IdentityProviderRestrictions.SafeListEquals(other.IdentityProviderRestrictions) &&
                IdentityTokenLifetime.SafeEquals(other.IdentityTokenLifetime) &&
                IncludeJwtId.SafeEquals(other.IncludeJwtId) &&
                LogoUri.SafeEquals(other.LogoUri) &&
                LogoutSessionRequired.SafeEquals(other.LogoutSessionRequired) &&
                LogoutUri.SafeEquals(other.LogoutUri) &&
                PostLogoutRedirectUris.SafeListEquals(other.PostLogoutRedirectUris) &&
                Properties.SafeEquals(other.Properties) &&
                ProtocolType.SafeEquals(other.ProtocolType) &&
                RedirectUris.SafeListEquals(other.RedirectUris) &&
                RefreshTokenExpiration.SafeEquals(other.RefreshTokenExpiration) &&
                RefreshTokenUsage.SafeEquals(other.RefreshTokenUsage) &&
                RequireClientSecret.SafeEquals(other.RequireClientSecret) &&
                RequireConsent.SafeEquals(other.RequireConsent) &&
                RequirePkce.SafeEquals(other.RequirePkce) &&
                SlidingRefreshTokenLifetime.SafeEquals(other.SlidingRefreshTokenLifetime) &&
                UpdateAccessTokenClaimsOnRefresh.SafeEquals(other.UpdateAccessTokenClaimsOnRefresh);

            return(result);
        }
예제 #3
0
        public void TestAsking(string response, string expectedName)
        {
            WhatsYourName dialogUnit = new WhatsYourName();
            DialogContext context    = new DialogContext();

            DialogUnitTestUtils.TestInitiating(dialogUnit, context, "Как тебя зовут?", response);
            ClientName clientName = context.GetItem <ClientName>();

            Assert.NotNull(clientName);
            Assert.Equal(expectedName, clientName.Value);
        }
예제 #4
0
		private void ClientAddWindow_Loaded(object sender, RoutedEventArgs e)
		{
#if DEBUG
			Address.Text = Default.Address;
#endif
			Port.Text = Default.Port.ToString();
			ClientName.Text = Environment.MachineName;
			DownloadFolder.Text = FileUtil.GetDownloadFolder();
			SetGroupImage();

			ClientName.Focus();
		}
예제 #5
0
        protected override string GetStatement(DialogContext context)
        {
            ClientName clientName = context.GetItem <ClientName>();
            bool       hasName    = clientName != null && !clientName.IsAnonymous;
            string     pre        = hasName ? $"{clientName.Value}, ты" : "Ты";

            return($@"{pre} можешь спросить меня:
 - Как меня зовут
 - Как дела
 - Сколько сейчас времени
 - Список пользователей в чате");
        }
예제 #6
0
        public override int GetHashCode()
        {
            int result = 17;

            result = 31 * result + Id.GetHashCode();
            result = 31 * result + Address.GetHashCode();
            result = 31 * result + ClientName.GetHashCode();
            result = 31 * result + JobNumber.GetHashCode();
            result = 31 * result + (IsActive ? 1 : 0);

            return(result);
        }
 public override int GetHashCode() {
   int hash = 1;
   if (ClientId != 0L) hash ^= ClientId.GetHashCode();
   if (ClientName.Length != 0) hash ^= ClientName.GetHashCode();
   if (FacilityId != 0L) hash ^= FacilityId.GetHashCode();
   if (FacilityCode.Length != 0) hash ^= FacilityCode.GetHashCode();
   if (FacilityName.Length != 0) hash ^= FacilityName.GetHashCode();
   hash ^= data_.GetHashCode();
   if (_unknownFields != null) {
     hash ^= _unknownFields.GetHashCode();
   }
   return hash;
 }
예제 #8
0
 public Expression <Func <Commission, bool> > GetExpresion()
 {
     return(x =>
            (VendorId == null || x.VendorId == VendorId) &&
            (ClientId == null || x.ClientId != null && x.ClientId == ClientId) &&
            (ClientName == null || x.ClientName.ToLower().Contains(ClientName.ToLower())) &&
            (Product == null || x.Product.ToLower().Contains(Product.ToLower())) &&
            (Price == null || x.Price == Price) &&
            (PaymentType == null || x.PaymentType == PaymentType) &&
            (DateFrom == null || x.Date >= DateFrom) &&
            (DateTo == null || x.Date <= DateTo) &&
            (Value == null || x.Value == Value));
 }
예제 #9
0
        public LatestConfig(IList <string> args)
        {
            ClientName         = args[0];
            DownloadLink       = args[1];
            PublishDate        = args[2];
            ChangelogLink      = args[3];
            SlimCatChannelId   = args[4];
            UpdateImpactsTheme = bool.Parse(args[5]);

#if DEBUG
            IsNewUpdate = false;
#else
            IsNewUpdate = ClientName.IsUpdate();
#endif
        }
예제 #10
0
 public PointDeviceCollcet CreatePoints(ClientName name)
 {
     if (name == ClientName.DL645_1997Client || name == ClientName.DL645_2007Client)
     {
         return(PointsCollcetCreate.CreateDL645(_workbook, _log));
     }
     else if (name == ClientName.S7CommClient)
     {
         return(PointsCollcetCreate.CreateS7(_workbook, _log));
     }
     else
     {
         return(PointsCollcetCreate.Create(_workbook, _log));
     }
 }
예제 #11
0
 public virtual Task WriteHeader(SourceBufferWriter buf)
 {
     buf.Write(HeaderId);
     buf.Write(Protocol);
     buf.Write(NetworkProtocol);
     buf.WriteString(ServerName.AsSpan(), 260);
     buf.WriteString(ClientName.AsSpan(), 260);
     buf.WriteString(MapName.AsSpan(), 260);
     buf.WriteString(GameDirectory.AsSpan(), 260);
     buf.Write(PlaybackTime);
     buf.Write(PlaybackTicks);
     buf.Write(PlaybackFrames);
     buf.Write(SignOnLength);
     return(Task.CompletedTask);
 }
예제 #12
0
        /// <summary>
        /// Saves a client to the database
        /// </summary>
        public void Commit()
        {
            Validate(); // will throw an exception as appropriate
            DBHelper dbh = new DBHelper("REPLACE INTO allowedoauthclients SET ClientID=?id, ClientSecret=?secret, CallBack=?callback, ClientName=?name, Scopes=?scopes, owningUserName=?user, ClientType=1");

            dbh.DoNonQuery((comm) =>
            {
                comm.Parameters.AddWithValue("id", ClientIdentifier.LimitTo(45));
                comm.Parameters.AddWithValue("secret", ClientSecret.LimitTo(255));
                comm.Parameters.AddWithValue("callback", CallbacksAsString.LimitTo(1024));
                comm.Parameters.AddWithValue("name", ClientName.LimitTo(255));
                comm.Parameters.AddWithValue("scopes", Scope.LimitTo(255));
                comm.Parameters.AddWithValue("user", OwningUser.LimitTo(255));
            });
            OAuth2AuthorizationServer.RefreshClients();
        }
예제 #13
0
        public override IPLCDriver CreateClient(ClientName name)
        {
            switch (name)
            {
            case ClientName.ModbusTCPClient:
                return(new ModbusTCPClient(_setUp, _timeOut, _log));

            case ClientName.S7CommClient:
                var config = _config as S7CommClientConfig;
                int slotNo = config.SlotNo;
                return(new S7CommClient(_setUp, _timeOut, _log, slotNo));

            default:
                return(null);
            }
        }
예제 #14
0
        public override void DoTask(MainWindow mw)
        {
            Channel ch;
            bool    channelBad = !Sender.ChannelList.TryGetValue(ChannelHash, out ch) || !ch.Joined; // GameSurge may send info about client with channel name: *.. so we try to process all these messages

            Client c         = null;
            string lowerName = ClientName.ToLower();

            if (!Sender.Clients.TryGetValue(lowerName, out c))
            {
                if (!channelBad)
                {
                    c = new Client(ClientName, Sender, Clan);
                }
                else // we don't have any common channel with this client
                {
                    return;
                }
            }

            c.OnlineStatus = Client.Status.Online;
            if (!c.TusActive)
            {
                c.Country = Country;
                c.Rank    = RanksClass.GetRankByInt(Rank);
            }
            c.GreatSnooper = ClientGreatSnooper;
            c.ClientApp    = ClientApp;

            // This is needed, because when we join a channel we get information about the channel users using the WHO command
            if (!channelBad && !c.Channels.Contains(ch))
            {
                ch.Clients.Add(c);
            }

            if (c.AddToChannel.Count > 0)
            {
                foreach (Channel channel in c.AddToChannel)
                {
                    if (!c.Channels.Contains(ch))
                    {
                        channel.Clients.Add(c);
                    }
                }
                c.AddToChannel.Clear();
            }
        }
 private void CreateClient_Click(object sender, EventArgs e)
 {
     using (SqlConnection Conect = new SqlConnection(@"Data Source=DESKTOP-78L61PQ\SQLEXPRESS;
     Initial Catalog=Sistema de Prestamos; Integrated Security=True;"))
     {
         Conect.Open();
         SqlCommand cmd = new SqlCommand("addClients", Conect);
         cmd.CommandType = System.Data.CommandType.StoredProcedure;
         cmd.Parameters.AddWithValue("@Nombre", ClientName.Text);
         cmd.Parameters.AddWithValue("@Direccion", Dir.Text);
         cmd.Parameters.AddWithValue("@Telefono", Pho.Text);
         cmd.ExecuteNonQuery();
         ClientName.Clear();
         Dir.Clear();
         Pho.Clear();
     }
 }
예제 #16
0
        public override IPLCDriver CreateClient(ClientName name)
        {
            switch (name)
            {
            case ClientName.ModbusRTUClient:
                return(new ModbusRTUMaster(_setUp, _timeOut, _log));

            case ClientName.DL645_1997Client:
                return(new DL645_1997Driver(_setUp, _timeOut, _log));

            case ClientName.DL645_2007Client:
                return(new DL645_2007Driver(_setUp, _timeOut, _log));

            default:
                return(null);
            }
        }
예제 #17
0
        public bool RsaVerify(ClientName client, byte[] hash, byte[] signature)
        {
            RSACryptoServiceProvider prov;

            if (client == ClientName.Alice)
            {
                prov = m_AliceRsa;
            }
            else if (client == ClientName.Bob)
            {
                prov = m_BobRsa;
            }
            else
            {
                throw new ArgumentException();
            }
            return(prov.VerifyHash(hash, "SHA256", signature));
        }
예제 #18
0
        public byte[] RsaSign(ClientName client, byte[] plainText)
        {
            RSACryptoServiceProvider prov;

            if (client == ClientName.Alice)
            {
                prov = m_AliceRsa;
            }
            else if (client == ClientName.Bob)
            {
                prov = m_BobRsa;
            }
            else
            {
                throw new ArgumentException();
            }
            return(prov.SignData(plainText, new SHA256CryptoServiceProvider()));
        }
예제 #19
0
        public override int GetHashCode()
        {
            int hash = 1;

            if (ClientName.Length != 0)
            {
                hash ^= ClientName.GetHashCode();
            }
            if (ClientMessage.Length != 0)
            {
                hash ^= ClientMessage.GetHashCode();
            }
            if (_unknownFields != null)
            {
                hash ^= _unknownFields.GetHashCode();
            }
            return(hash);
        }
예제 #20
0
 private void button3_Click(object sender, EventArgs e)
 {
     ClientName.Clear();
     ClientSurname.Clear();
     ClientPatronymic.Clear();
     ClientPhone.Clear();
     HouseBox.Clear();
     StreetBox.Clear();
     CityBox.Clear();
     FlatBox.Clear();
     CategoryBox.Text     = "";
     ProductBox.Text      = "";
     ServiceType.Text     = "";
     numericUpDown1.Value = 1;
     CostBox.Clear();
     PreCost.Clear();
     dataGridView1.Rows.Clear();
     dateTimePicker2.Value = dateTimePicker1.Value;
 }
예제 #21
0
        /// <summary>
        /// Initializes the cid.
        /// </summary>
        private void _init_CID()
        {
            try
            {
                string[] name_args = ClientName.Split(' ');
                char[]   nameTag = new char[3];
                int[]    namecode = new int[3]; int nameCode = 0;
                for (int i = 0; i < nameTag.Length; i++)
                {
                    nameTag[i]  = (name_args[i].Remove(0, 0).ToUpper()[0]);
                    namecode[i] = (int)nameTag[i];
                    nameCode   += namecode[i];
                }

                int ms, ss, mn, hr;
                hr = DateTime.Now.Hour;
                mn = DateTime.Now.Minute;
                ss = DateTime.Now.Second;
                ms = DateTime.Now.Millisecond;
                int avg_nmcode = nameCode / 3;
                int avg        = (hr + mn + ss + ms) / 4;
                int dayofyear  = DateTime.Now.DayOfYear;

                string avg_str = (avg <= 9) ? String.Format("{0}{1}{2}", 0, 0, avg) : String.Format("{0}{1}", 0, avg);
                avg_str = (avg > 99) ? avg.ToString() : avg_str;

                string avg_code = (avg_nmcode <= 9) ? String.Format("{0}{1}{2}", 0, 0, avg_nmcode) : String.Format("{0}{1}", 0, avg_nmcode);
                avg_code = (avg_nmcode > 99) ? avg_nmcode.ToString() : avg_code;

                string sex = String.Format("{0}", (int)ClientSex);


                string day = (dayofyear <= 9) ? String.Format("{0}{1}{2}", 0, 0, dayofyear) : String.Format("{0}{1}", 0, dayofyear);
                day = (dayofyear > 99) ? dayofyear.ToString() : day;

                ClientID = String.Format("{0}{1}{2}{3}{4}{5}{6}", sex, nameTag[0], day, nameTag[1], avg_str, nameTag[2], avg_code);
            }
            catch (IndexOutOfRangeException ex)
            {
                new Logger().LogException("A Certain field of the form has a  null entry", LogExceptionType.Null);
                //   _init_CID();
            }
        }
예제 #22
0
 /// <summary>
 /// 组排结束后点击完成执行的方法
 /// </summary>
 private void OnClikComplete(ClientName clientName)
 {
     if (clientName == ClientName.BaoDingQiPai)
     {
         TransferData data = new TransferData();
         data.SetValue("Index", 0);
         ModelDispatcher.Instance.Dispatch(ConstantGuPaiJiu.OnSeatCtrlGroupPoker, data);
         ClikComplete();
     }
     else
     {
         for (int i = 0; i < pokerList.Count; i++)
         {
             Debug.Log(pokerList[i] + "                                              组合完成发给服务器的牌" + i);
         }
         SendNotification(ConstantGuPaiJiu.GuPaiJiuClientSendGroupPoker, pokerList);
         isOpenTime = false;
     }
 }
예제 #23
0
        public override string ToString()
        {
            var sBuilder = new StringBuilder();

            sBuilder.AppendFormat("[Id={0}, Time={1}, Duration={2}",
                                  Id, Time, Duration);

            if (!ClientInfo.IsEmpty())
            {
                sBuilder.AppendFormat(", ClientInfo={0}", ClientInfo);
            }

            if (!ClientName.IsEmpty())
            {
                sBuilder.AppendFormat(", ClientName={0}", ClientName);
            }

            sBuilder.Append(']');

            var cmdInfo = CommandInfo;

            if (cmdInfo != null)
            {
                var length = cmdInfo.Length;
                if (length > 0)
                {
                    sBuilder.AppendLine();
                    sBuilder.Append("CommandInfo=");
                    for (var i = 0; i < length; i++)
                    {
                        var item = cmdInfo[i];
                        if (item != null)
                        {
                            sBuilder.Append(item);
                            sBuilder.Append(' ');
                        }
                    }
                }
            }

            return(sBuilder.ToString());
        }
예제 #24
0
        /// <summary>
        /// 创建单个客户端配置类 ,只取第一个有效位
        /// </summary>
        /// <param name="clientName"></param>
        /// <returns></returns>
        //public ClientConfig CreatClientConfig(ClientName clientName)
        //{
        //    ClientConfig result=null;
        //    if(clientName== ClientName.ModbusTCPClient)
        //    {
        //        var configs= ReaderXMLUtil.ReadXMLConfig<TCPClientConfig>(_configPath, ConfigUtilly.ReadConfig, "setup", _taskName);
        //        if (configs != null)
        //        {
        //            result = configs[0];
        //        }
        //    }
        //    else if (clientName == ClientName.S7CommClient)
        //    {
        //        var configs = ReaderXMLUtil.ReadXMLConfig<S7CommClientConfig>(_configPath, ConfigUtilly.ReadConfig, "setup", _taskName);
        //        if (configs != null)
        //        {
        //            result = configs[0];
        //        }
        //    }
        //    else if (clientName == ClientName.ModbusRTUClient||clientName==ClientName.DL645_1997Client||clientName==ClientName.DL645_2007Client)
        //    {
        //        var configs = ReaderXMLUtil.ReadXMLConfig<ComClientConfig>(_configPath, ConfigUtilly.ReadConfig, "setup", _taskName);
        //        if (configs != null)
        //        {
        //            result = configs[0];
        //        }
        //    }

        //    return result;

        //}
        /// <summary>
        /// 创建客户端配置类列表,根据客户端名称获取所有配置表内项目
        /// </summary>
        /// <param name="clientName"></param>
        /// <returns></returns>
        public List <ClientConfig> CreatClientConfigs(ClientName clientName)
        {
            List <ClientConfig> result = null;

            if (clientName == ClientName.ModbusTCPClient)
            {
                var configs = ReaderXMLUtil.ReadXMLConfig <TCPClientConfig>(_configPath, ConfigUtilly.ReadConfig, "setup", _taskName);
                if (configs != null)
                {
                    result = new List <ClientConfig>();
                    foreach (var config in configs)
                    {
                        result.Add(config);
                    }
                }
            }
            else if (clientName == ClientName.S7CommClient)
            {
                var configs = ReaderXMLUtil.ReadXMLConfig <S7CommClientConfig>(_configPath, ConfigUtilly.ReadConfig, "setup", _taskName);
                if (configs != null)
                {
                    result = new List <ClientConfig>();
                    foreach (var config in configs)
                    {
                        result.Add(config);
                    }
                }
            }
            else if (clientName == ClientName.ModbusRTUClient || clientName == ClientName.DL645_1997Client || clientName == ClientName.DL645_2007Client)
            {
                var configs = ReaderXMLUtil.ReadXMLConfig <ComClientConfig>(_configPath, ConfigUtilly.ReadConfig, "setup", _taskName);
                if (configs != null)
                {
                    result = new List <ClientConfig>();
                    foreach (var config in configs)
                    {
                        result.Add(config);
                    }
                }
            }
            return(result);
        }
예제 #25
0
        public override void DoTask(MainWindow mw)
        {
            Channel ch = null;

            if (!Sender.ChannelList.TryGetValue(ChannelHash, out ch))
            {
                return;
            }

            Client c = null;

            if (!Sender.Clients.TryGetValue(ClientName.ToLower(), out c))
            {
                return;
            }

            Client c2 = null;

            if (!Sender.Clients.TryGetValue(SenderName.ToLower(), out c2) || !ch.IsInConversation(c2))
            {
                return;
            }

            if (Type == ClientAddOrRemoveTask.TaskType.Add)
            {
                ch.AddClientToConversation(c, false);
                ch.AddMessage(GlobalManager.SystemClient, SenderName + " has added " + ClientName + " to the conversation.", MessageSettings.OfflineMessage);
            }
            else
            {
                if (ClientName.ToLower() == Sender.User.LowerName)
                {
                    ch.AddMessage(GlobalManager.SystemClient, "You have been removed from this conversation.", MessageSettings.OfflineMessage);
                    ch.Disabled = true;
                }
                else
                {
                    ch.RemoveClientFromConversation(c, false);
                    ch.AddMessage(GlobalManager.SystemClient, SenderName + " has removed " + ClientName + " from the conversation.", MessageSettings.OfflineMessage);
                }
            }
        }
예제 #26
0
        public RSAParameters GetPrivateRsaPara(ClientName client)
        {
            RSACryptoServiceProvider prov;

            if (client == ClientName.Alice)
            {
                prov = m_AliceRsa;
            }
            else if (client == ClientName.Bob)
            {
                prov = m_BobRsa;
            }
            else
            {
                throw new ArgumentException();
            }
            RSAParameters rsap = prov.ExportParameters(true);

            return(rsap);
        }
예제 #27
0
        /// <summary>
        /// Hash code for the Metadata for equality checks
        /// </summary>
        public override int GetHashCode()
        {
            // Get the hash code for the Date field if it is not null.
            int hashDate = Date == null ? 0 : Date.GetHashCode();

            // Get the hash code for the Description field.
            int hashClientName = ClientName.GetHashCode();

            // Get the hash code for the UserComments field.
            int hashInvoiceReference = InvoiceReference.GetHashCode();

            // Get the hash code for the Amount field.
            int hashAmount = Amount.GetHashCode();

            // Get the hash code for the Amount field.
            int hashDescription = Description.GetHashCode();

            // Calculate the hash code for the transaction.
            return(hashDate ^ hashClientName ^ hashInvoiceReference ^ hashAmount ^ hashDescription);
        }
예제 #28
0
        public async Task UpdateClientNameOnWorkspace_ShouldReturnClientUpdateDto()
        {
            var clientRequest = new ClientRequest {
                Name = "Test add client " + Guid.NewGuid()
            };
            var createResult = await _client.CreateClientAsync(_workspaceId, clientRequest);

            createResult.IsSuccessful.Should().BeTrue();
            createResult.Data.Should().NotBeNull();

            string updatedClientName = "Test update client " + Guid.NewGuid();

            var updateClientNameRequest = new ClientName {
                Name = updatedClientName
            };
            var updateClientNameResponse = await _client.UpdateClientNameAsync(_workspaceId, createResult.Data.Id, updateClientNameRequest);

            updateClientNameResponse.IsSuccessful.Should().BeTrue();
            updateClientNameResponse.Data.Should().NotBeNull();
            updateClientNameResponse.Data.Name.Should().Match(updatedClientName);
        }
예제 #29
0
        private void ClientEditWindow_Loaded(object sender, RoutedEventArgs e)
        {
            // Client
            ClientComponent client = _entity.Get <ClientComponent>();

            ClientName.Text   = client.Name;
            DownloadPath.Text = client.Download;
            ClientName.Focus();

            // Group
            GroupComponent group = _entity.Get <GroupComponent>();

            GroupPath.Text = group.Path;
            SetGroup();

            // Options
            ClientOptionsComponent options = _entity.Get <ClientOptionsComponent>();

            MaxDownloads.Text = options.MaxDownloads.ToString();
            MaxUploads.Text   = options.MaxUploads.ToString();
        }
예제 #30
0
        public virtual int _GetUniqueIdentifier()
        {
            var hashCode = 399326290;

            hashCode = hashCode * -1521134295 + (RequestPath?.GetHashCode() ?? 0);
            hashCode = hashCode * -1521134295 + (Message?.GetHashCode() ?? 0);
            hashCode = hashCode * -1521134295 + (RequestId?.GetHashCode() ?? 0);
            hashCode = hashCode * -1521134295 + (RequestMethod?.GetHashCode() ?? 0);
            hashCode = hashCode * -1521134295 + (ElapsedMsecs?.GetHashCode() ?? 0);
            hashCode = hashCode * -1521134295 + (IP?.GetHashCode() ?? 0);
            hashCode = hashCode * -1521134295 + (Service?.GetHashCode() ?? 0);
            hashCode = hashCode * -1521134295 + (Operation?.GetHashCode() ?? 0);
            hashCode = hashCode * -1521134295 + (StatusCode?.GetHashCode() ?? 0);
            hashCode = hashCode * -1521134295 + (Timestamp?.GetHashCode() ?? 0);
            hashCode = hashCode * -1521134295 + (Username?.GetHashCode() ?? 0);
            hashCode = hashCode * -1521134295 + (RequestUri?.GetHashCode() ?? 0);
            hashCode = hashCode * -1521134295 + (ClientId?.GetHashCode() ?? 0);
            hashCode = hashCode * -1521134295 + (ClientName?.GetHashCode() ?? 0);
            hashCode = hashCode * -1521134295 + (ProductName?.GetHashCode() ?? 0);
            hashCode = hashCode * -1521134295 + (RequestLogKey?.GetHashCode() ?? 0);
            return(hashCode);
        }