Example #1
0
        public InitCommand(string clientid, string id, string clientLocalIP, IPAddress requestedServerAddress, Runtime.Caching.ClientInfo clientInfo)
        {
            _initCommand = new Alachisoft.NCache.Common.Protobuf.InitCommand();
            base.name    = "InitCommand";

            _currentVersion                     = Alachisoft.NCache.Common.ProductVersion.ProductInfo;
            _initCommand.cacheId                = id;
            _initCommand.clientId               = clientid;
            _initCommand.isDotnetClient         = true;
            _initCommand.requestId              = base.RequestId;
            _initCommand.clientInfo             = new ClientInfo();
            _initCommand.clientInfo.machineName = clientInfo.MachineName;
            _initCommand.clientInfo.processId   = clientInfo.ProcessID;
            _initCommand.clientInfo.appName     = clientInfo.AppName;
            _initCommand.clientInfo.clientId    = clientInfo.ClientID;
            if (_initCommand.productVersion == null)
            {
                _initCommand.productVersion = new Common.Protobuf.ProductVersion();
            }

            _initCommand.productVersion.AddiotionalData = _currentVersion.AdditionalData;
            _initCommand.productVersion.EditionID       = _currentVersion.EditionID;
            _initCommand.productVersion.MajorVersion1   = this.ParseToByteArray(_currentVersion.MajorVersion1);
            _initCommand.productVersion.MajorVersion2   = this.ParseToByteArray(_currentVersion.MajorVersion2);
            _initCommand.productVersion.MinorVersion1   = this.ParseToByteArray(_currentVersion.MinorVersion1);
            _initCommand.productVersion.MinorVersion2   = this.ParseToByteArray(_currentVersion.MinorVersion2);
            _initCommand.productVersion.ProductName     = _currentVersion.ProductName;


            _initCommand.clientVersion = 4620;
        }
Example #2
0
        public InitCommand(string clientid, string id, string clientLocalIP, IPAddress requestedServerAddress, Runtime.Caching.ClientInfo clientInfo, int operationTimeout)
        {
            _initCommand = new Alachisoft.NCache.Common.Protobuf.InitCommand();


            _currentVersion                     = Alachisoft.NCache.Common.ProductVersion.ProductInfo;
            _initCommand.cacheId                = id;
            _initCommand.clientId               = clientid;
            _initCommand.isDotnetClient         = true;
            _initCommand.requestId              = base.RequestId;
            _initCommand.clientInfo             = new ClientInfo();
            _initCommand.clientInfo.machineName = clientInfo.MachineName;
            _initCommand.clientInfo.processId   = clientInfo.ProcessID;
            _initCommand.clientInfo.appName     = clientInfo.AppName;
            _initCommand.clientVersion          = clientInfo.ClientVersion;
            _initCommand.clientInfo.clientId    = clientInfo.ClientID;


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

            _initCommand.productVersion.AddiotionalData = _currentVersion.AdditionalData;
            _initCommand.productVersion.EditionID       = _currentVersion.EditionID;
            _initCommand.productVersion.MajorVersion1   = this.ParseToByteArray(_currentVersion.MajorVersion1);
            _initCommand.productVersion.MajorVersion2   = this.ParseToByteArray(_currentVersion.MajorVersion2);
            _initCommand.productVersion.MinorVersion1   = this.ParseToByteArray(_currentVersion.MinorVersion1);
            _initCommand.productVersion.MinorVersion2   = this.ParseToByteArray(_currentVersion.MinorVersion2);
            _initCommand.productVersion.ProductName     = _currentVersion.ProductName;

            _initCommand.operationTimeout = operationTimeout;
            _initCommand.clientVersion    = 5000;
            _initCommand.OperationSystem  = GetOSPlatform().ToString();
        }