Example #1
0
        public GetRunningServersCommand(string id, byte[] userName, byte[] password)
        {
            base.name                                = "GetRunningServersCommand";
            _currentVersion                          = Alachisoft.NCache.Common.ProductVersion.ProductInfo;
            _getRunningServersCommand                = new Alachisoft.NCache.Common.Protobuf.GetRunningServersCommand();
            _getRunningServersCommand.cacheId        = id;
            _getRunningServersCommand.binaryUserId   = userName;
            _getRunningServersCommand.binaryPassword = password;

            _getRunningServersCommand.isDotnetClient = true;
            _getRunningServersCommand.requestId      = base.RequestId;

            // Live upgrade task
            //Protobuf. Product Version is assigned values
            if (_getRunningServersCommand.productVersion == null)
            {
                _getRunningServersCommand.productVersion = new Common.Protobuf.ProductVersion();
            }

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

            Alachisoft.NCache.Common.Protobuf.GetRunningServersCommand getRunningServerCommand = command.getRunningServersCommand;

            cmdInfo.CacheId        = getRunningServerCommand.cacheId;
            cmdInfo.IsDotNetClient = getRunningServerCommand.isDotnetClient;
            cmdInfo.RequestId      = getRunningServerCommand.requestId.ToString();
            return(cmdInfo);
        }
        //PROTOBUF
        private CommandInfo ParseCommand(Alachisoft.NCache.Common.Protobuf.Command command, ClientManager clientManager)
        {
            CommandInfo cmdInfo = new CommandInfo();

            Alachisoft.NCache.Common.Protobuf.GetRunningServersCommand getRunningServerCommand = command.getRunningServersCommand;

            cmdInfo.CacheId        = getRunningServerCommand.cacheId;
            cmdInfo.IsDotNetClient = getRunningServerCommand.isDotnetClient;
            cmdInfo.Password       = getRunningServerCommand.pwd;
            cmdInfo.PasswordBinary = getRunningServerCommand.binaryPassword;
            cmdInfo.RequestId      = getRunningServerCommand.requestId.ToString();
            cmdInfo.UserName       = getRunningServerCommand.userId;
            cmdInfo.UserNameBinary = getRunningServerCommand.binaryUserId;

            return(cmdInfo);
        }