Esempio n. 1
0
        public object Clone()
        {
            CacheServerConfig config = new CacheServerConfig();

            config.Name         = Name != null ? (string)Name.Clone(): null;
            config.cacheType    = this.cacheType;
            config.InProc       = InProc;
            config.ConfigID     = ConfigID;
            config.LastModified = LastModified != null ? (string)LastModified.Clone() : null;

            config.clientNodes = clientNodes != null?clientNodes.Clone() as ClientNodes : null;

            config.Log                  = Log != null ? (Log)Log.Clone(): null;
            config.PerfCounters         = PerfCounters != null ? (PerfCounters)PerfCounters.Clone(): null;
            config.autoBalancing        = this.autoBalancing != null ? (AutoLoadBalancing)this.autoBalancing.Clone() : null;
            config.Cleanup              = Cleanup != null ? (Cleanup)Cleanup.Clone() : null;
            config.Storage              = Storage != null ? (Storage)Storage.Clone() : null;
            config.EvictionPolicy       = EvictionPolicy != null ? (EvictionPolicy)EvictionPolicy.Clone() : null;
            config.Cluster              = Cluster != null ? (Cluster)Cluster.Clone() : null;
            config.QueryIndices         = QueryIndices != null ? (QueryIndex)QueryIndices.Clone() : null;
            config.IsRegistered         = this.IsRegistered;
            config.IsRunning            = this.IsRunning;
            config.licenseIsExpired     = this.licenseIsExpired;
            config.RuntimeContext       = this.RuntimeContext;
            config.ClientDeathDetection = this.deathDetection;
            return(config);
        }
Esempio n. 2
0
        public object Clone()
        {
            CacheServerConfig config = new CacheServerConfig();

            config.Name      = Name != null ? (string)Name.Clone() : null;
            config.cacheType = this.cacheType;

            config.InProc = InProc;

            config.clientNodes = clientNodes != null?clientNodes.Clone() as ClientNodes : null;

            config.Log          = Log != null ? (Log)Log.Clone() : null;
            config.PerfCounters = PerfCounters != null ? (PerfCounters)PerfCounters.Clone() : null;


#if COMMUNITY || CLIENT
            config.ReplicationStrategy = ReplicationStrategy != null ? (ReplicationStrategy)ReplicationStrategy.Clone() : null;
            config.autoBalancing       = this.autoBalancing != null ? (AutoLoadBalancing)this.autoBalancing.Clone() : null;
#endif

            config.Cleanup          = Cleanup != null ? (Cleanup)Cleanup.Clone() : null;
            config.Storage          = Storage != null ? (Storage)Storage.Clone() : null;
            config.EvictionPolicy   = EvictionPolicy != null ? (EvictionPolicy)EvictionPolicy.Clone() : null;
            config.ExpirationPolicy = ExpirationPolicy != null ? (ExpirationPolicy)ExpirationPolicy.Clone() : null;

            config.Cluster = Cluster != null ? (Cluster)Cluster.Clone() : null;


            config.backingSource = this.backingSource != null ? (BackingSource)this.backingSource.Clone() : null;


            config.QueryIndices  = QueryIndices != null ? (QueryIndex)QueryIndices.Clone() : null;
            config.Notifications = Notifications != null ? (Notifications)Notifications.Clone() : null;

            config.SQLDependencyConfig     = SQLDependencyConfig != null ? (SQLDependencyConfig)SQLDependencyConfig.Clone() : null;
            config.TaskConfiguration       = TaskConfiguration != null ? (TaskConfiguration)TaskConfiguration.Clone() : null;
            config.ClientDeathDetection    = ClientDeathDetection != null ? (ClientDeathDetection)ClientDeathDetection.Clone() : null;
            config.SynchronizationStrategy = SynchronizationStrategy != null ? (SynchronizationStrategy)SynchronizationStrategy.Clone() : null;

            config.ClientActivityNotification = ClientActivityNotification != null
                ? (ClientActivityNotification)ClientActivityNotification.Clone()
                : null;
            config.IsRegistered     = this.IsRegistered;
            config.IsRunning        = this.IsRunning;
            config.licenseIsExpired = this.licenseIsExpired;
            config.RuntimeContext   = this.RuntimeContext;
            config.DataFormat       = this.DataFormat;

            return(config);
        }