コード例 #1
0
ファイル: UsageMonitorItem.cs プロジェクト: kallex/Caloom
        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);
            }
        }
コード例 #2
0
 private void CopyContentFrom(StorageTransactionUsage sourceObject)
 {
     TimeRange = sourceObject.TimeRange;
             UsageType = sourceObject.UsageType;
             AmountOfTransactions = sourceObject.AmountOfTransactions;
 }
コード例 #3
0
partial         static void CreateCustomDemo(ref StorageTransactionUsage customDemoObject);
コード例 #4
0
        public static StorageTransactionUsage CreateDemoDefault()
        {
            StorageTransactionUsage customDemo = null;
                    StorageTransactionUsage.CreateCustomDemo(ref customDemo);
                    if(customDemo != null)
                        return customDemo;
                    var result = new StorageTransactionUsage();
                    result.TimeRange = TimeRange.CreateDemoDefault();
                    result.UsageType = @"StorageTransactionUsage.UsageType";

                    return result;
        }
コード例 #5
0
 public static StorageTransactionUsage CreateDefault()
 {
     var result = new StorageTransactionUsage();
             result.TimeRange = TimeRange.CreateDefault();
             return result;
 }
コード例 #6
0
ファイル: TheBallCore.designer.cs プロジェクト: kallex/Caloom
        void IInformationObject.SetInstanceTreeValuesAsUnmodified()
        {
            _unmodified_OwnerInfo = OwnerInfo;
                    if(OwnerInfo != null)
                        ((IInformationObject) OwnerInfo).SetInstanceTreeValuesAsUnmodified();

                    _unmodified_ProcessorUsage = ProcessorUsage;
                    if(ProcessorUsage != null)
                        ((IInformationObject) ProcessorUsage).SetInstanceTreeValuesAsUnmodified();

                    _unmodified_StorageTransactionUsage = StorageTransactionUsage;
                    if(StorageTransactionUsage != null)
                        ((IInformationObject) StorageTransactionUsage).SetInstanceTreeValuesAsUnmodified();

                    _unmodified_NetworkUsage = NetworkUsage;
                    if(NetworkUsage != null)
                        ((IInformationObject) NetworkUsage).SetInstanceTreeValuesAsUnmodified();

                    _unmodified_RequestDetails = RequestDetails;
                    if(RequestDetails != null)
                        ((IInformationObject) RequestDetails).SetInstanceTreeValuesAsUnmodified();
        }
コード例 #7
0
ファイル: UsageMonitorItem.cs プロジェクト: kallex/Caloom
 private void addStorageTransactionUsageToTraget(StorageTransactionUsage target, StorageTransactionUsage source)
 {
     target.AmountOfTransactions += source.AmountOfTransactions;
 }