Beispiel #1
0
 internal AgileTcpListener(int int_5, bool bool_3, string string_2, bool bool_4, bool bool_5, IAgileLogger iagileLogger_2, IAgileLogger iagileLogger_3, Class119 class119_0)
 {
     if ((!bool_3 && ((this.enum0_0 == ((ClientTimeEnum)3)) || (this.enum0_0 == ((ClientTimeEnum)2)))) && smethod_0("ESF-" + this.string_0))
     {
         throw new Exception("CJFramework Error : there's one CJFramework server instance running. AuthorizedUserID is " + this.string_0);
     }
     this.bool_0             = bool_5;
     this.iagileLogger_0     = iagileLogger_2;
     this.iagileLogger_1     = iagileLogger_3;
     this.eventSafeTrigger_0 = new EventSafeTrigger(iagileLogger_2, "Agt5W7B5WBoJhMi3tS0.akDdtXBaxZZh04bUDlN");
     this.class117_0         = new Class117(this.string_0, this.enum0_0, this.iagileLogger_1, class119_0);
     if (!(bool_3 || !this.bool_2))
     {
         this.class117_0.Event_0 += new CbGeneric <bool, bool>(this.method_6);
         this.class117_0.method_2();
     }
     if (cbGeneric_1 == null)
     {
         cbGeneric_1 = new CbGeneric <NetworkStream, EndPoint>(AgileTcpListener.OnTcpConnectionEstablished);
     }
     this.TcpConnectionEstablished += cbGeneric_1;
     this.bool_1 = bool_3;
     this.int_0  = bool_3 ? 0x7fffffff : (this.int_3 + 1);
     if (string_2 != null)
     {
         this.tcpListener_0 = new TcpListener(IPAddress.Parse(string_2), int_5);
     }
     else
     {
         this.tcpListener_0 = new TcpListener(IPAddress.Any, int_5);
         if (Socket.OSSupportsIPv6 && bool_4)
         {
             this.tcpListener_1 = new TcpListener(IPAddress.IPv6Any, int_5);
         }
     }
     this.tcpListener_0.Server.SetSocketOption(SocketOptionLevel.Socket, SocketOptionName.ReuseAddress, bool_3);
     if (this.tcpListener_1 != null)
     {
         this.tcpListener_1.Server.SetSocketOption(SocketOptionLevel.Socket, SocketOptionName.ReuseAddress, bool_3);
     }
 }
Beispiel #2
0
 public void method_0()
 {
     if (this.dataTable_0 != null)
     {
         for (int i = 0; i < this.dataTable_0.Rows.Count; i++)
         {
             for (int j = 0; j < this.dataTable_0.Columns.Count; j++)
             {
                 string str = this.dataTable_0.Rows[i][j].ToString();
                 for (int k = 0; k < str.Length; k++)
                 {
                     char key = str[k];
                     if (key != ' ')
                     {
                         Class117 item = new Class117 {
                             int_2   = k,
                             int_1   = j,
                             int_0   = i,
                             float_0 = 0.1f
                         };
                         if (this.dictionary_0.ContainsKey(key))
                         {
                             this.dictionary_0[key].Add(item);
                         }
                         else
                         {
                             List <Class117> list = new List <Class117> {
                                 item
                             };
                             this.dictionary_0.Add(key, list);
                         }
                     }
                 }
             }
         }
     }
 }
Beispiel #3
0
 public Stream imethod_0(Class117 A_0)
 {
     return(this.class476_0.method_1().method_2(Class476.smethod_1(A_0.method_2())).method_3());
 }
 public abstract void Visit(Class117 c);
 public override void Visit(Class117 c) { }
Beispiel #6
0
 // Token: 0x06000F54 RID: 3924
 // RVA: 0x00053458 File Offset: 0x00051658
 public Class114()
 {
     this.method_11();
     this.class117_0 = new Class117();
     this.class117_0.method_0(new EventHandler<EventArgs0>(this.method_13));
     this.class117_0.method_1(new EventHandler<EventArgs0>(this.method_14));
     this.class116_0 = new Class116();
     this.timeSpan_4 = TimeSpan.Zero;
     this.timeSpan_0 = TimeSpan.Zero;
     this.timeSpan_2 = TimeSpan.Zero;
     this.timeSpan_3 = TimeSpan.FromTicks(166667L);
     this.timeSpan_1 = TimeSpan.FromMilliseconds(20.0);
 }
Beispiel #7
0
        public DataTable method_1(string string_0)
        {
            if (string.IsNullOrEmpty(string_0))
            {
                return(this.dataTable_0);
            }
            Dictionary <int, Class118> dictionary = new Dictionary <int, Class118>();

            foreach (char ch in string_0)
            {
                if ((ch != ' ') && this.dictionary_0.ContainsKey(ch))
                {
                    foreach (Class117 class5 in this.dictionary_0[ch])
                    {
                        if (dictionary.ContainsKey(class5.int_0))
                        {
                            dictionary[class5.int_0].list_0.Add(class5);
                        }
                        else
                        {
                            Class118 class7 = new Class118 {
                                int_0   = class5.int_0,
                                float_0 = 0f
                            };
                            class7.list_0.Add(class5);
                            dictionary.Add(class5.int_0, class7);
                        }
                    }
                }
            }
            List <Class118> list = new List <Class118>();

            foreach (KeyValuePair <int, Class118> pair in dictionary)
            {
                Class118 item = pair.Value;
                float    num  = 0f;
                for (int i = 0; i < item.list_0.Count; i++)
                {
                    num += item.list_0[i].float_0;
                    for (int j = i; j < item.list_0.Count; j++)
                    {
                        Class117 class3 = item.list_0[i];
                        Class117 class4 = item.list_0[j];
                        if ((class3.int_0 == class4.int_0) && (class3.int_1 == class4.int_1))
                        {
                            num += (float)Math.Pow(0.7, (double)Math.Abs((int)(class3.int_2 - class4.int_2)));
                        }
                    }
                    item.float_0 = num;
                }
                if (list.Count == 0)
                {
                    list.Add(item);
                    continue;
                }
                bool flag  = true;
                int  index = 0;
                while (index < list.Count)
                {
                    if (list[index].float_0 < item.float_0)
                    {
                        goto Label_0231;
                    }
                    index++;
                }
                goto Label_023E;
Label_0231:
                list.Insert(index, item);
                flag = false;
Label_023E:
                if (flag)
                {
                    list.Add(item);
                }
            }
            DataTable table = new DataTable();

            table = this.dataTable_0.Copy();
            table.Clear();
            foreach (Class118 class8 in list)
            {
                DataRow row = this.dataTable_0.Rows[class8.int_0];
                table.ImportRow(row);
            }
            return(table);
        }