Exemplo n.º 1
0
 public void IncrementStat(NetworkDetailStats.NetworkDirection direction, string entryName, int amount)
 {
     NetworkDetailStats.NetworkOperationEntryDetails details;
     if (this.m_Entries.ContainsKey(entryName))
     {
         details = this.m_Entries[entryName];
     }
     else
     {
         details = new NetworkDetailStats.NetworkOperationEntryDetails {
             m_EntryName = entryName
         };
         this.m_Entries[entryName] = details;
     }
     details.AddStat(direction, amount);
     if (direction != NetworkDetailStats.NetworkDirection.Incoming)
     {
         if (direction == NetworkDetailStats.NetworkDirection.Outgoing)
         {
             this.totalOut += amount;
         }
     }
     else
     {
         this.totalIn += amount;
     }
 }
Exemplo n.º 2
0
 public void SetStat(NetworkDetailStats.NetworkDirection direction, string entryName, int amount)
 {
     NetworkDetailStats.NetworkOperationEntryDetails networkOperationEntryDetails;
     if (this.m_Entries.ContainsKey(entryName))
     {
         networkOperationEntryDetails = this.m_Entries[entryName];
     }
     else
     {
         networkOperationEntryDetails             = new NetworkDetailStats.NetworkOperationEntryDetails();
         networkOperationEntryDetails.m_EntryName = entryName;
         this.m_Entries[entryName] = networkOperationEntryDetails;
     }
     networkOperationEntryDetails.AddStat(direction, amount);
     if (direction != NetworkDetailStats.NetworkDirection.Incoming)
     {
         if (direction == NetworkDetailStats.NetworkDirection.Outgoing)
         {
             this.totalOut = (float)amount;
         }
     }
     else
     {
         this.totalIn = (float)amount;
     }
 }
            public void IncrementStat(NetworkDetailStats.NetworkDirection direction, string entryName, int amount)
            {
                NetworkDetailStats.NetworkOperationEntryDetails operationEntryDetails;
                if (this.m_Entries.ContainsKey(entryName))
                {
                    operationEntryDetails = this.m_Entries[entryName];
                }
                else
                {
                    operationEntryDetails             = new NetworkDetailStats.NetworkOperationEntryDetails();
                    operationEntryDetails.m_EntryName = entryName;
                    this.m_Entries[entryName]         = operationEntryDetails;
                }
                operationEntryDetails.AddStat(direction, amount);
                switch (direction)
                {
                case NetworkDetailStats.NetworkDirection.Incoming:
                    this.totalIn += (float)amount;
                    break;

                case NetworkDetailStats.NetworkDirection.Outgoing:
                    this.totalOut += (float)amount;
                    break;
                }
            }
Exemplo n.º 4
0
            public void SetStat(NetworkDetailStats.NetworkDirection direction, string entryName, int amount)
            {
                NetworkDetailStats.NetworkOperationEntryDetails details;
                if (this.m_Entries.ContainsKey(entryName))
                {
                    details = this.m_Entries[entryName];
                }
                else
                {
                    details = new NetworkDetailStats.NetworkOperationEntryDetails {
                        m_EntryName = entryName
                    };
                    this.m_Entries[entryName] = details;
                }
                details.AddStat(direction, amount);
                switch (direction)
                {
                case NetworkDetailStats.NetworkDirection.Incoming:
                    this.totalIn = amount;
                    break;

                case NetworkDetailStats.NetworkDirection.Outgoing:
                    this.totalOut = amount;
                    break;
                }
            }
 public void IncrementStat(NetworkDetailStats.NetworkDirection direction, string entryName, int amount)
 {
   NetworkDetailStats.NetworkOperationEntryDetails operationEntryDetails;
   if (this.m_Entries.ContainsKey(entryName))
   {
     operationEntryDetails = this.m_Entries[entryName];
   }
   else
   {
     operationEntryDetails = new NetworkDetailStats.NetworkOperationEntryDetails();
     operationEntryDetails.m_EntryName = entryName;
     this.m_Entries[entryName] = operationEntryDetails;
   }
   operationEntryDetails.AddStat(direction, amount);
   switch (direction)
   {
     case NetworkDetailStats.NetworkDirection.Incoming:
       this.totalIn += (float) amount;
       break;
     case NetworkDetailStats.NetworkDirection.Outgoing:
       this.totalOut += (float) amount;
       break;
   }
 }
Exemplo n.º 6
0
            public void SetStat(NetworkDetailStats.NetworkDirection direction, string entryName, int amount)
            {
                NetworkDetailStats.NetworkOperationEntryDetails details;
                if (this.m_Entries.ContainsKey(entryName))
                {
                    details = this.m_Entries[entryName];
                }
                else
                {
                    details = new NetworkDetailStats.NetworkOperationEntryDetails {
                        m_EntryName = entryName
                    };
                    this.m_Entries[entryName] = details;
                }
                details.AddStat(direction, amount);
                switch (direction)
                {
                    case NetworkDetailStats.NetworkDirection.Incoming:
                        this.totalIn = amount;
                        break;

                    case NetworkDetailStats.NetworkDirection.Outgoing:
                        this.totalOut = amount;
                        break;
                }
            }
 public void IncrementStat(NetworkDetailStats.NetworkDirection direction, string entryName, int amount)
 {
     NetworkDetailStats.NetworkOperationEntryDetails details;
     if (this.m_Entries.ContainsKey(entryName))
     {
         details = this.m_Entries[entryName];
     }
     else
     {
         details = new NetworkDetailStats.NetworkOperationEntryDetails {
             m_EntryName = entryName
         };
         this.m_Entries[entryName] = details;
     }
     details.AddStat(direction, amount);
     if (direction != NetworkDetailStats.NetworkDirection.Incoming)
     {
         if (direction == NetworkDetailStats.NetworkDirection.Outgoing)
         {
             this.totalOut += amount;
         }
     }
     else
     {
         this.totalIn += amount;
     }
 }