public GetOptimalServerCommand(string id, byte[] userName, byte[] password)
        {
            _currentVersion = Alachisoft.NCache.Common.ProductVersion.ProductInfo;
            base.name       = "GetOptimalServerCommand";

            _getOptimalServerCommand                = new Alachisoft.NCache.Common.Protobuf.GetOptimalServerCommand();
            _getOptimalServerCommand.cacheId        = id;
            _getOptimalServerCommand.binaryUserId   = userName;
            _getOptimalServerCommand.binaryPassword = password;

            _getOptimalServerCommand.isDotnetClient = true;
            _getOptimalServerCommand.requestId      = base.RequestId;
            //Protobuf. Product Version is assigned values

            if (_getOptimalServerCommand.productVersion == null)
            {
                _getOptimalServerCommand.productVersion = new Common.Protobuf.ProductVersion();
            }

            _getOptimalServerCommand.productVersion.AddiotionalData = _currentVersion.AdditionalData;
            _getOptimalServerCommand.productVersion.EditionID       = _currentVersion.EditionID;
            _getOptimalServerCommand.productVersion.MajorVersion1   = this.ParseToByteArray(_currentVersion.MajorVersion1);
            _getOptimalServerCommand.productVersion.MajorVersion2   = this.ParseToByteArray(_currentVersion.MajorVersion2);
            _getOptimalServerCommand.productVersion.MinorVersion1   = this.ParseToByteArray(_currentVersion.MinorVersion1);
            _getOptimalServerCommand.productVersion.MinorVersion2   = this.ParseToByteArray(_currentVersion.MinorVersion2);
            _getOptimalServerCommand.productVersion.ProductName     = _currentVersion.ProductName;
        }
Esempio n. 2
0
        private CommandInfo ParseCommand(Alachisoft.NCache.Common.Protobuf.Command command, ClientManager clientManager)
        {
            CommandInfo cmdInfo = new CommandInfo();

            Alachisoft.NCache.Common.Protobuf.GetOptimalServerCommand getOptimalServerCommand = command.getOptimalServerCommand;

            cmdInfo.CacheId = getOptimalServerCommand.cacheId;
            return(cmdInfo);
        }
        //PROTOBUF
        private CommandInfo ParseCommand(Alachisoft.NCache.Common.Protobuf.Command command, ClientManager clientManager)
        {
            CommandInfo cmdInfo = new CommandInfo();

            Alachisoft.NCache.Common.Protobuf.GetOptimalServerCommand getOptimalServerCommand = command.getOptimalServerCommand;

            cmdInfo.CacheId        = getOptimalServerCommand.cacheId;
            cmdInfo.IsDotNetClient = getOptimalServerCommand.isDotnetClient;
            cmdInfo.RequestId      = getOptimalServerCommand.requestId.ToString();

            return(cmdInfo);
        }