Пример #1
0
        public void InitializeSteppedCollections()
        {
            int totalMinutes = (int) (TimeRangeInclusiveStartExclusiveEnd.EndTime -
                                      TimeRangeInclusiveStartExclusiveEnd.StartTime).TotalMinutes;
            var collSizes = totalMinutes / StepSizeInMinutes;
            ProcessorUsages = new ProcessorUsageCollection();
            StorageTransactionUsages = new StorageTransactionUsageCollection();
            StorageUsages = new StorageUsageCollection();
            NetworkUsages = new NetworkUsageCollection();

            for (int i = 0; i < collSizes; i++)
            {
                var processorUsage = new ProcessorUsage();
                processorUsage.TimeRange = new TimeRange { StartTime = DateTime.MinValue.ToUniversalTime(), EndTime = DateTime.MinValue.ToUniversalTime() };
                ProcessorUsages.CollectionContent.Add(processorUsage);
                var storageTransactionUsage = new StorageTransactionUsage();
                StorageTransactionUsages.CollectionContent.Add(storageTransactionUsage);
                var networkUsage = new NetworkUsage();
                NetworkUsages.CollectionContent.Add(networkUsage);
                var storageUsage = new StorageUsage();
                storageUsage.SnapshotTime = DateTime.MinValue.ToUniversalTime();
                StorageUsages.CollectionContent.Add(storageUsage);
            }
        }
        void IInformationObject.SetInstanceTreeValuesAsUnmodified()
        {
            _unmodified_OwnerInfo = OwnerInfo;
                    if(OwnerInfo != null)
                        ((IInformationObject) OwnerInfo).SetInstanceTreeValuesAsUnmodified();

                    _unmodified_ProcessorUsages = ProcessorUsages;
                    if(ProcessorUsages != null)
                        ((IInformationObject) ProcessorUsages).SetInstanceTreeValuesAsUnmodified();

                    _unmodified_StorageTransactionUsages = StorageTransactionUsages;
                    if(StorageTransactionUsages != null)
                        ((IInformationObject) StorageTransactionUsages).SetInstanceTreeValuesAsUnmodified();

                    _unmodified_StorageUsages = StorageUsages;
                    if(StorageUsages != null)
                        ((IInformationObject) StorageUsages).SetInstanceTreeValuesAsUnmodified();

                    _unmodified_NetworkUsages = NetworkUsages;
                    if(NetworkUsages != null)
                        ((IInformationObject) NetworkUsages).SetInstanceTreeValuesAsUnmodified();
        }
 private void CopyContentFrom(StorageUsageCollection sourceObject)
 {
     CollectionContent = sourceObject.CollectionContent;
             _unmodified_CollectionContent = sourceObject._unmodified_CollectionContent;
 }
partial         static void CreateCustomDemo(ref StorageUsageCollection customDemoObject);
 public static StorageUsageCollection CreateDemoDefault()
 {
     StorageUsageCollection customDemo = null;
             StorageUsageCollection.CreateCustomDemo(ref customDemo);
             if(customDemo != null)
                 return customDemo;
             var result = new StorageUsageCollection();
             result.CollectionContent.Add(StorageUsage.CreateDemoDefault());
             //result.CollectionContent.Add(StorageUsage.CreateDemoDefault());
             //result.CollectionContent.Add(StorageUsage.CreateDemoDefault());
             return result;
 }
 public static StorageUsageCollection CreateDefault()
 {
     var result = new StorageUsageCollection();
             return result;
 }
Пример #7
0
        void IInformationObject.SetInstanceTreeValuesAsUnmodified()
        {
            _unmodified_StepSizeInMinutes = StepSizeInMinutes;

                    _unmodified_OwnerInfo = OwnerInfo;
                    if(OwnerInfo != null)
                        ((IInformationObject) OwnerInfo).SetInstanceTreeValuesAsUnmodified();

                    _unmodified_TimeRangeInclusiveStartExclusiveEnd = TimeRangeInclusiveStartExclusiveEnd;
                    if(TimeRangeInclusiveStartExclusiveEnd != null)
                        ((IInformationObject) TimeRangeInclusiveStartExclusiveEnd).SetInstanceTreeValuesAsUnmodified();

                    _unmodified_ProcessorUsages = ProcessorUsages;
                    if(ProcessorUsages != null)
                        ((IInformationObject) ProcessorUsages).SetInstanceTreeValuesAsUnmodified();

                    _unmodified_StorageTransactionUsages = StorageTransactionUsages;
                    if(StorageTransactionUsages != null)
                        ((IInformationObject) StorageTransactionUsages).SetInstanceTreeValuesAsUnmodified();

                    _unmodified_StorageUsages = StorageUsages;
                    if(StorageUsages != null)
                        ((IInformationObject) StorageUsages).SetInstanceTreeValuesAsUnmodified();

                    _unmodified_NetworkUsages = NetworkUsages;
                    if(NetworkUsages != null)
                        ((IInformationObject) NetworkUsages).SetInstanceTreeValuesAsUnmodified();
        }