Exemple #1
0
        private static UtilsClientBridge DestroyRequest(Type last)
        {
            //Discarded unreachable code: IL_0002
            //IL_0003: Incompatible stack heights: 0 vs 1
            UtilsClientBridge utilsClientBridge = new UtilsClientBridge((ParamsComposerWorker)PropertyTest._0001()._0003()(null, new object[2]
            {
                last,
                null
            }), new List <FactoryDicCandidate>());

            object[] array = (object[])PropertyTest._0001()._0002()(null, new object[2]
            {
                last,
                null
            });
            foreach (object obj in array)
            {
                FactoryDicCandidate item = new FactoryDicCandidate((int)PropertyTest._0001()._0003()(obj), (string)PropertyTest._0001()._0002()(obj), (PropertyInfo[])PropertyTest._0001()._0006()(obj, new object[0]), (ParamsComposerWorker)PropertyTest._0001()._0004()(null, new object[2]
                {
                    obj,
                    null
                }), (ParamsComposerWorker)PropertyTest._0001()._0005()(null, new object[2]
                {
                    obj,
                    null
                }));
                utilsClientBridge.m_StatusIssuer.Add(item);
            }
            return(utilsClientBridge);
        }
Exemple #2
0
        public override bool _0001(Type def)
        {
            //Discarded unreachable code: IL_0002
            //IL_0003: Incompatible stack heights: 0 vs 1
            if (typeof(IEnumerable).IsAssignableFrom(def))
            {
                return(false);
            }
            object[] customAttributes = def.GetCustomAttributes(inherit: true);
            bool     flag             = false;

            object[] array = customAttributes;
            for (int i = 0; i < array.Length; i++)
            {
                Type type = array[i].GetType();
                if (type.FullName == "Microsoft.FSharp.Core.CompilationMappingAttribute")
                {
                    PropertyTest.MoveIssuer(type.RevertReader());
                    flag = true;
                    break;
                }
            }
            if (!flag)
            {
                return(false);
            }
            return((bool)PropertyTest._0001()._0001()(null, new object[2]
            {
                def,
                null
            }));
        }
Exemple #3
0
        public void ContainerLifeTimeIsControlledCorrectlyExternally()
        {
            var foo = new PropertyTest();

            Container.Register(foo);
            Assert.AreEqual(foo, Container.GetService <PropertyTest>());
            Container.Unregister(foo);
            Assert.IsNull(Container.GetService <PropertyTest>());
        }
Exemple #4
0
        public void ContainerLifeTimeIsControlledCorrectlyExplicitly()
        {
            var foo = new PropertyTest();

            var lifetime = Container.Register(foo);

            Assert.AreEqual(foo, Container.GetService <PropertyTest>());
            lifetime.Dispose();
            Assert.IsNull(Container.GetService <PropertyTest>());
        }
 private void StartClient(Type last)
 {
     //Discarded unreachable code: IL_0002
     //IL_0003: Incompatible stack heights: 0 vs 1
     if (!_0006() && last.Name == "FSharpList`1")
     {
         PropertyTest.MoveIssuer(last.RevertReader());
         m_ExpressionTest = PropertyTest._0001().ForgotIssuer(this._0001());
     }
 }
Exemple #6
0
        public void GlobalPropertyTestSetPropertyShouldWork()
        {
            var engine = new Engine();
            var pt     = new PropertyTest();

            engine.SetConstant("prop", pt);

            engine.Interpret("prop.test = \"Hi!\"");

            Assert.AreEqual("Hi!", pt.test);
        }
Exemple #7
0
        public void ContainerLifeTimeIsControlledCorrectlyImplicitly()
        {
            var foo = new PropertyTest();

            using (Container.Register(foo))
            {
                Assert.AreEqual(foo, Container.GetService <PropertyTest>());
            }

            Assert.IsNull(Container.GetService <PropertyTest>());
        }
Exemple #8
0
        public ParamClientBridge(Type asset)
        {
            //Discarded unreachable code: IL_0002, IL_0006
            //IL_0003: Incompatible stack heights: 0 vs 1
            //IL_0007: Incompatible stack heights: 0 vs 1
            SingletonReader.PushGlobal();
            base._002Ector(asset);
            _ErrorProperty = (ParameterFilterResolver)5;
            Type second;
            Type util;

            if (ResolverErrorFilter.FillReader(asset, typeof(IDictionary <, >), out m_AttrProperty))
            {
                second = m_AttrProperty.GetGenericArguments()[0];
                util   = m_AttrProperty.GetGenericArguments()[1];
                if (ResolverErrorFilter.OrderReader(base._0002(), typeof(IDictionary <, >)))
                {
                    _0002(typeof(Dictionary <, >).MakeGenericType(second, util));
                }
                else if (asset.CallReader() && asset.GetGenericTypeDefinition().FullName == "System.Collections.Concurrent.ConcurrentDictionary`2")
                {
                    printerProperty = true;
                }
            }
            else
            {
                ResolverErrorFilter.MapReader(base._0002(), out second, out util);
                if (base._0002() == typeof(IDictionary))
                {
                    _0002(typeof(Dictionary <object, object>));
                }
            }
            if (second != null && util != null)
            {
                m_MappingProperty = ObserverIteratorMapping.InitTest(base._0003(), typeof(KeyValuePair <, >).MakeGenericType(second, util), typeof(IDictionary <, >).MakeGenericType(second, util));
                if (!this._0003() && asset.Name == "FSharpMap`2")
                {
                    PropertyTest.MoveIssuer(asset.RevertReader());
                    _ObserverProperty = PropertyTest._0001().IncludeIssuer(second, util);
                }
            }
            if (!typeof(IDictionary).IsAssignableFrom(base._0003()))
            {
                printerProperty = true;
            }
            queueProperty   = second;
            m_ProxyProperty = util;
            if (this._0001() != null && _0004() != null && ParamRequestStrategy.InstantiateIssuer(asset, this._0001(), _0004(), out Type _0005, out GDBD.Specifications.AdapterClassSpec <object> _0006))
            {
                _0002(_0005);
                _ObserverProperty = _0006;
                composerProperty  = true;
            }
        }
Exemple #9
0
        public void IsEqual_WhenArgumentIsProperty_Throws()
        {
            // Arrange
            var obj = new PropertyTest();

            // Act/Assert
            var exception = GetException <NotExpectedException <int> >(() => obj.RunGuard());

            // Assert
            AssertNotExpectedException(exception, "Prop", obj.Prop, 1);
        }
Exemple #10
0
        private static Type ComputeRequest(Type param)
        {
            //Discarded unreachable code: IL_0002
            //IL_0003: Incompatible stack heights: 0 vs 1
            object arg = ((object[])PropertyTest._0001()._0002()(null, new object[2]
            {
                param,
                null
            })).First();

            return((Type)PropertyTest._0001()._0001()(arg));
        }
Exemple #11
0
        public void NullablePropertyWorks()
        {
            var a = new PropertyTest();

            Assert.False(a.Property.HasValue);
            a.Property = 5;
            Assert.True(a.Property.HasValue);
            Assert.AreEqual(5, a.Property);
            Assert.AreEqual(5, a.Property.Value);
            a.Property = null;
            Assert.False(a.Property.HasValue);
        }
Exemple #12
0
        public void NullableFieldWorks()
        {
            var a = new PropertyTest();

            Assert.False(a.field.HasValue);
            a.field = 5;
            Assert.True(a.field.HasValue);
            Assert.AreEqual(5, a.field);
            Assert.AreEqual(5, a.field.Value);
            a.field = null;
            Assert.False(a.field.HasValue);
        }
Exemple #13
0
        public void IsEqual_WhenArgumentIsProperty_Throws()
        {
            // Arrange
            var obj = new PropertyTest();

            // Act/Assert
            ArgumentOutOfRangeException exception =
                GetException <ArgumentOutOfRangeException>(() => obj.RunGuard());

            // Assert
            AssertArgumentNotEqualException(exception, "Prop", obj.Prop, 1);
        }
        public static void _Main()
        {
            PropertyTest propertyTest = new PropertyTest();

            propertyTest.Foos.Add(new Foo(1));
            propertyTest.Foos.Add(new Foo(2));
            foreach (Foo foo in propertyTest.Foos)
            {
                Console.WriteLine(foo.Id);
            }
            Console.ReadKey();
        }
Exemple #15
0
        public void GlobalPropertyTestGetPropertyShouldWork()
        {
            var engine = new Engine();
            var pt     = new PropertyTest();

            pt.test = "Ho!";
            engine.SetConstant("prop", pt);

            var result = engine.Interpret("prop.test");

            Assert.AreEqual("Ho!", result);
        }
Exemple #16
0
            public void ReturnsFalseForMissingProperty()
            {
                // Given
                PropertyTest propertyTest = new PropertyTest();
                IMetadata    metadata     = PropertyMetadata <PropertyTest> .For(propertyTest);

                // When
                bool result = metadata.TryGetValue("Bar", out object value);

                // Then
                result.ShouldBeFalse();
                value.ShouldBe(default);
Exemple #17
0
        public void IsEqual_WhenArgumentIsProperty_Throws()
        {
            // Arrange
            var obj = new PropertyTest();

            // Act/Assert
            ArgumentException exception =
                GetException <ArgumentException>(() => obj.RunGuard());

            // Assert
            AssertArgumentException(exception, "Prop", "Specified argument was out of the range of valid values.\r\nParameter name: Prop");
        }
Exemple #18
0
        public void IsEqual_WhenArgumentIsProperty_Throws()
        {
            // Arrange
            var obj = new PropertyTest();

            // Act/Assert
            ArgumentException exception =
                GetException<ArgumentException>(() => obj.RunGuard());

            // Assert
            AssertArgumentException(exception, "Prop", "Specified argument was out of the range of valid values.\r\nParameter name: Prop");
        }
Exemple #19
0
            public void GetsPropertyAsMetadata()
            {
                // Given
                PropertyTest propertyTest = new PropertyTest();
                IMetadata    metadata     = PropertyMetadata <PropertyTest> .For(propertyTest);

                // When
                bool result = metadata.TryGetValue("Foo", out object value);

                // Then
                result.ShouldBeTrue();
                value.ShouldBe(3);
            }
Exemple #20
0
    public static void Main(string[] args)
    {
        PropertyTest pt = new PropertyTest();

        pt.Name = "헬로 키티";          // Property의 set 기능 테스트 : write
        Console.WriteLine(pt.Name); // Property의 get 기능 테스트 : read
        Console.WriteLine(pt.ReadOnly);
        //pt.ReadOnly = 100;
        pt.WriteOnly = 100;
        //Console.WriteLine(pt.WriteOnly);
        PropertyTest.Static = 200;
        Console.WriteLine(PropertyTest.Static);
    }
Exemple #21
0
    static void Main(string[] args)
    {
        PropertyTest pt = new PropertyTest();

        pt.Name = "헬로 키티";
        Console.WriteLine(pt.Name);
        Console.WriteLine(pt.Readonly);
        //pt.Readonly = 100;
        pt.Writeonly = 100;
        //Console.WriteLine(pt.Writeonly);
        PropertyTest.Static = 200;
        Console.WriteLine(PropertyTest.Static);
    }
Exemple #22
0
        public void PropertiesArentSerialized()
        {
            var obj1 = new PropertyTest();

            PropertyTest.val = 7;

            var serializer = new FudgeSerializer(context);
            var msg        = serializer.SerializeToMsg(obj1);

            PropertyTest.val = 0;

            var obj2 = (PropertyTest)serializer.Deserialize(msg);

            Assert.Equal(0, PropertyTest.val);
        }
    public static void Main()
    {
        PropertyTest propertyTest = new PropertyTest();
        Stopwatch    stopwatch    = new Stopwatch();

        stopwatch.Start();
        propertyTest.LoopUsingField();
        Console.WriteLine("Using field: " + stopwatch.ElapsedMilliseconds / 1000.0);
        stopwatch.Restart();
        propertyTest.LoopUsingBoxedGetter();
        Console.WriteLine("Using boxed getter: " + stopwatch.ElapsedMilliseconds / 1000.0);
        stopwatch.Restart();
        propertyTest.LoopUsingUnboxedGetter();
        Console.WriteLine("Using unboxed getter: " + stopwatch.ElapsedMilliseconds / 1000.0);
    }
Exemple #24
0
        public void IsEqual_WhenArgumentIsProperty_Throws()
        {
            // Arrange
            var obj = new PropertyTest();

            // Act/Assert
            ArgumentOutOfRangeException exception =
                GetException<ArgumentOutOfRangeException>(() => obj.RunGuard());

            // Assert
            AssertArgumentNotEqualException(exception, "Prop", obj.Prop, 1);
        }
        public bool HasMatch(SpawnPoint spawn)
        {
            string str;

            char[] chrArray;
            if (spawn == null || spawn.SpawnObjects == null)
            {
                return(false);
            }
            bool flag = true;

            if (this.cmbSpawnerMap.SelectedIndex == 0 && this._Editor.cbxMap.SelectedIndex != (int)spawn.Map)
            {
                flag = false;
            }
            if (flag && this.txtSpawnerName.Text != null && this.txtSpawnerName.Text.Length > 0)
            {
                bool flag1 = false;
                if (this.chkNameCase.Checked)
                {
                    if (spawn.SpawnName.IndexOf(this.txtSpawnerName.Text) >= 0)
                    {
                        flag1 = true;
                    }
                }
                else if (spawn.SpawnName.ToLower().IndexOf(this.txtSpawnerName.Text.ToLower()) >= 0)
                {
                    flag1 = true;
                }
                if (this.cmbNameHas.SelectedIndex == 0)
                {
                    if (!flag1)
                    {
                        flag = false;
                    }
                }
                else if (flag1)
                {
                    flag = false;
                }
            }
            if (flag && this.txtSpawnerEntry.Text != null && this.txtSpawnerEntry.Text.Length > 0)
            {
                bool flag2 = false;
                if (spawn.SpawnObjects != null)
                {
                    foreach (SpawnObject spawnObject in spawn.SpawnObjects)
                    {
                        if (!this.chkEntryCase.Checked)
                        {
                            if (spawnObject.TypeName == null || spawnObject.TypeName.ToLower().IndexOf(this.txtSpawnerEntry.Text.ToLower()) < 0)
                            {
                                continue;
                            }
                            flag2 = true;
                            break;
                        }
                        else
                        {
                            if (spawnObject.TypeName == null || spawnObject.TypeName.IndexOf(this.txtSpawnerEntry.Text) < 0)
                            {
                                continue;
                            }
                            flag2 = true;
                            break;
                        }
                    }
                }
                if (this.cmbEntryHas.SelectedIndex == 0)
                {
                    if (!flag2)
                    {
                        flag = false;
                    }
                }
                else if (flag2)
                {
                    flag = false;
                }
            }
            if (flag && this.txtSpawnerEntry2.Text != null && this.txtSpawnerEntry2.Text.Length > 0)
            {
                bool flag3 = false;
                if (spawn.SpawnObjects != null)
                {
                    foreach (SpawnObject spawnObject1 in spawn.SpawnObjects)
                    {
                        if (!this.chkEntryCase2.Checked)
                        {
                            if (spawnObject1.TypeName == null || spawnObject1.TypeName.ToLower().IndexOf(this.txtSpawnerEntry2.Text.ToLower()) < 0)
                            {
                                continue;
                            }
                            flag3 = true;
                            break;
                        }
                        else
                        {
                            if (spawnObject1.TypeName == null || spawnObject1.TypeName.IndexOf(this.txtSpawnerEntry2.Text) < 0)
                            {
                                continue;
                            }
                            flag3 = true;
                            break;
                        }
                    }
                }
                if (this.cmbEntryHas2.SelectedIndex == 0)
                {
                    if (!flag3)
                    {
                        flag = false;
                    }
                }
                else if (flag3)
                {
                    flag = false;
                }
            }
            if (flag && this.txtSpawnerEntryType.Text != null && this.txtSpawnerEntryType.Text.Length > 0)
            {
                bool flag4 = false;
                Type type  = SpawnEditor.FindRunUOType(this.txtSpawnerEntryType.Text.ToLower());
                if (spawn.SpawnObjects != null && type != null)
                {
                    foreach (SpawnObject spawnObject2 in spawn.SpawnObjects)
                    {
                        Type type1 = null;
                        if (spawnObject2.TypeName != null)
                        {
                            string typeName = spawnObject2.TypeName;
                            chrArray = new char[] { '/' };
                            string[] strArrays = typeName.Split(chrArray);
                            string   str1      = null;
                            if (strArrays != null && (int)strArrays.Length > 0)
                            {
                                str1 = strArrays[0];
                            }
                            type1 = SpawnEditor.FindRunUOType(str1);
                        }
                        if (type1 == null || type1 != type && !type1.IsSubclassOf(type))
                        {
                            continue;
                        }
                        flag4 = true;
                        break;
                    }
                }
                if (this.cmbEntryTypeHas.SelectedIndex == 0)
                {
                    if (!flag4)
                    {
                        flag = false;
                    }
                }
                else if (flag4)
                {
                    flag = false;
                }
            }
            if (flag && this.txtSpawnerEntryType2.Text != null && this.txtSpawnerEntryType2.Text.Length > 0)
            {
                bool flag5 = false;
                Type type2 = SpawnEditor.FindRunUOType(this.txtSpawnerEntryType2.Text.ToLower());
                if (spawn.SpawnObjects != null && type2 != null)
                {
                    foreach (SpawnObject spawnObject3 in spawn.SpawnObjects)
                    {
                        Type type3 = null;
                        if (spawnObject3.TypeName != null)
                        {
                            string typeName1 = spawnObject3.TypeName;
                            chrArray = new char[] { '/' };
                            string[] strArrays1 = typeName1.Split(chrArray);
                            string   str2       = null;
                            if (strArrays1 != null && (int)strArrays1.Length > 0)
                            {
                                str2 = strArrays1[0];
                            }
                            type3 = SpawnEditor.FindRunUOType(str2);
                        }
                        if (type3 == null || type3 != type2 && !type3.IsSubclassOf(type2))
                        {
                            continue;
                        }
                        flag5 = true;
                        break;
                    }
                }
                if (this.cmbEntryTypeHas2.SelectedIndex == 0)
                {
                    if (!flag5)
                    {
                        flag = false;
                    }
                }
                else if (flag5)
                {
                    flag = false;
                }
            }
            if (flag && this.cmbInContainers.SelectedIndex > 0)
            {
                if (this.cmbInContainers.SelectedIndex == 1 && !spawn.SpawnInContainer)
                {
                    flag = false;
                }
                else if (this.cmbInContainers.SelectedIndex == 2 && spawn.SpawnInContainer)
                {
                    flag = false;
                }
            }
            if (flag && this.cmbSequential.SelectedIndex > 0)
            {
                if (this.cmbSequential.SelectedIndex == 1 && spawn.SpawnSequentialSpawn < 0)
                {
                    flag = false;
                }
                else if (this.cmbSequential.SelectedIndex == 2 && spawn.SpawnSequentialSpawn >= 0)
                {
                    flag = false;
                }
            }
            if (flag && this.cmbSmartSpawning.SelectedIndex > 0)
            {
                if (this.cmbSmartSpawning.SelectedIndex == 1 && !spawn.SpawnSmartSpawning)
                {
                    flag = false;
                }
                else if (this.cmbSmartSpawning.SelectedIndex == 2 && spawn.SpawnSmartSpawning)
                {
                    flag = false;
                }
            }
            if (flag && this.cmbProximity.SelectedIndex > 0)
            {
                if (this.cmbProximity.SelectedIndex == 1 && spawn.SpawnProximityRange < 0)
                {
                    flag = false;
                }
                else if (this.cmbProximity.SelectedIndex == 2 && spawn.SpawnProximityRange >= 0)
                {
                    flag = false;
                }
            }
            if (flag && this.cmbRunning.SelectedIndex > 0)
            {
                if (this.cmbRunning.SelectedIndex == 1 && !spawn.SpawnIsRunning)
                {
                    flag = false;
                }
                else if (this.cmbRunning.SelectedIndex == 2 && spawn.SpawnIsRunning)
                {
                    flag = false;
                }
            }
            if (flag && this.chkAvgSpawnTime.Checked)
            {
                double spawnMinDelay = (spawn.SpawnMinDelay + spawn.SpawnMaxDelay) / 2;
                if (this.cmbAvgSpawnTime.SelectedIndex == 0 && spawnMinDelay >= (double)((double)this.numAvgSpawnTime.Value))
                {
                    flag = false;
                }
                else if (this.cmbAvgSpawnTime.SelectedIndex == 1 && spawnMinDelay <= (double)((double)this.numAvgSpawnTime.Value))
                {
                    flag = false;
                }
            }
            if (flag && this.txtPropertyTest.Text != null && this.txtPropertyTest.Text.Trim().Length > 0 && !PropertyTest.CheckPropertyString(spawn, this.txtPropertyTest.Text, out str))
            {
                flag = false;
            }
            if (flag && this.txtNotes.Text != null && this.txtNotes.Text.Trim().Length > 0)
            {
                bool flag6 = false;
                if (spawn.SpawnNotes != null && spawn.SpawnNotes.Length > 0 && spawn.SpawnNotes.ToLower().IndexOf(this.txtNotes.Text.ToLower()) >= 0)
                {
                    flag6 = true;
                }
                if (this.cmbNotes.SelectedIndex == 0)
                {
                    if (!flag6)
                    {
                        flag = false;
                    }
                }
                else if (flag6)
                {
                    flag = false;
                }
            }
            return(flag);
        }
        public bool HasMatch(SpawnPoint spawn)
        {
            if (spawn == null || spawn.SpawnObjects == null)
            {
                return(false);
            }
            bool flag1 = true;

            if (this.cmbSpawnerMap.SelectedIndex == 0 && (WorldMap)this._Editor.cbxMap.SelectedIndex != spawn.Map)
            {
                flag1 = false;
            }
            if (flag1 && this.txtSpawnerName.Text != null && this.txtSpawnerName.Text.Length > 0)
            {
                bool flag2 = false;
                if (this.chkNameCase.Checked)
                {
                    if (spawn.SpawnName.IndexOf(this.txtSpawnerName.Text) >= 0)
                    {
                        flag2 = true;
                    }
                }
                else if (spawn.SpawnName.ToLower().IndexOf(this.txtSpawnerName.Text.ToLower()) >= 0)
                {
                    flag2 = true;
                }
                if (this.cmbNameHas.SelectedIndex == 0)
                {
                    if (!flag2)
                    {
                        flag1 = false;
                    }
                }
                else if (flag2)
                {
                    flag1 = false;
                }
            }
            if (flag1 && this.txtSpawnerEntry.Text != null && this.txtSpawnerEntry.Text.Length > 0)
            {
                bool flag2 = false;
                if (spawn.SpawnObjects != null)
                {
                    foreach (SpawnObject spawnObject in spawn.SpawnObjects)
                    {
                        if (this.chkEntryCase.Checked)
                        {
                            if (spawnObject.TypeName != null && spawnObject.TypeName.IndexOf(this.txtSpawnerEntry.Text) >= 0)
                            {
                                flag2 = true;
                                break;
                            }
                        }
                        else if (spawnObject.TypeName != null && spawnObject.TypeName.ToLower().IndexOf(this.txtSpawnerEntry.Text.ToLower()) >= 0)
                        {
                            flag2 = true;
                            break;
                        }
                    }
                }
                if (this.cmbEntryHas.SelectedIndex == 0)
                {
                    if (!flag2)
                    {
                        flag1 = false;
                    }
                }
                else if (flag2)
                {
                    flag1 = false;
                }
            }
            if (flag1 && this.txtSpawnerEntry2.Text != null && this.txtSpawnerEntry2.Text.Length > 0)
            {
                bool flag2 = false;
                if (spawn.SpawnObjects != null)
                {
                    foreach (SpawnObject spawnObject in spawn.SpawnObjects)
                    {
                        if (this.chkEntryCase2.Checked)
                        {
                            if (spawnObject.TypeName != null && spawnObject.TypeName.IndexOf(this.txtSpawnerEntry2.Text) >= 0)
                            {
                                flag2 = true;
                                break;
                            }
                        }
                        else if (spawnObject.TypeName != null && spawnObject.TypeName.ToLower().IndexOf(this.txtSpawnerEntry2.Text.ToLower()) >= 0)
                        {
                            flag2 = true;
                            break;
                        }
                    }
                }
                if (this.cmbEntryHas2.SelectedIndex == 0)
                {
                    if (!flag2)
                    {
                        flag1 = false;
                    }
                }
                else if (flag2)
                {
                    flag1 = false;
                }
            }
            if (flag1 && this.txtSpawnerEntryType.Text != null && this.txtSpawnerEntryType.Text.Length > 0)
            {
                bool flag2     = false;
                Type runUoType = SpawnEditor.FindRunUOType(this.txtSpawnerEntryType.Text.ToLower());
                if (spawn.SpawnObjects != null && runUoType != null)
                {
                    foreach (SpawnObject spawnObject in spawn.SpawnObjects)
                    {
                        Type type = (Type)null;
                        if (spawnObject.TypeName != null)
                        {
                            string[] strArray = spawnObject.TypeName.Split('/');
                            string   name     = (string)null;
                            if (strArray != null && strArray.Length > 0)
                            {
                                name = strArray[0];
                            }
                            type = SpawnEditor.FindRunUOType(name);
                        }
                        if (type != null && (type == runUoType || type.IsSubclassOf(runUoType)))
                        {
                            flag2 = true;
                            break;
                        }
                    }
                }
                if (this.cmbEntryTypeHas.SelectedIndex == 0)
                {
                    if (!flag2)
                    {
                        flag1 = false;
                    }
                }
                else if (flag2)
                {
                    flag1 = false;
                }
            }
            if (flag1 && this.txtSpawnerEntryType2.Text != null && this.txtSpawnerEntryType2.Text.Length > 0)
            {
                bool flag2     = false;
                Type runUoType = SpawnEditor.FindRunUOType(this.txtSpawnerEntryType2.Text.ToLower());
                if (spawn.SpawnObjects != null && runUoType != null)
                {
                    foreach (SpawnObject spawnObject in spawn.SpawnObjects)
                    {
                        Type type = (Type)null;
                        if (spawnObject.TypeName != null)
                        {
                            string[] strArray = spawnObject.TypeName.Split('/');
                            string   name     = (string)null;
                            if (strArray != null && strArray.Length > 0)
                            {
                                name = strArray[0];
                            }
                            type = SpawnEditor.FindRunUOType(name);
                        }
                        if (type != null && (type == runUoType || type.IsSubclassOf(runUoType)))
                        {
                            flag2 = true;
                            break;
                        }
                    }
                }
                if (this.cmbEntryTypeHas2.SelectedIndex == 0)
                {
                    if (!flag2)
                    {
                        flag1 = false;
                    }
                }
                else if (flag2)
                {
                    flag1 = false;
                }
            }
            if (flag1 && this.cmbInContainers.SelectedIndex > 0)
            {
                if (this.cmbInContainers.SelectedIndex == 1 && !spawn.SpawnInContainer)
                {
                    flag1 = false;
                }
                else if (this.cmbInContainers.SelectedIndex == 2 && spawn.SpawnInContainer)
                {
                    flag1 = false;
                }
            }
            if (flag1 && this.cmbSequential.SelectedIndex > 0)
            {
                if (this.cmbSequential.SelectedIndex == 1 && spawn.SpawnSequentialSpawn < 0)
                {
                    flag1 = false;
                }
                else if (this.cmbSequential.SelectedIndex == 2 && spawn.SpawnSequentialSpawn >= 0)
                {
                    flag1 = false;
                }
            }
            if (flag1 && this.cmbSmartSpawning.SelectedIndex > 0)
            {
                if (this.cmbSmartSpawning.SelectedIndex == 1 && !spawn.SpawnSmartSpawning)
                {
                    flag1 = false;
                }
                else if (this.cmbSmartSpawning.SelectedIndex == 2 && spawn.SpawnSmartSpawning)
                {
                    flag1 = false;
                }
            }
            if (flag1 && this.cmbProximity.SelectedIndex > 0)
            {
                if (this.cmbProximity.SelectedIndex == 1 && spawn.SpawnProximityRange < 0)
                {
                    flag1 = false;
                }
                else if (this.cmbProximity.SelectedIndex == 2 && spawn.SpawnProximityRange >= 0)
                {
                    flag1 = false;
                }
            }
            if (flag1 && this.cmbRunning.SelectedIndex > 0)
            {
                if (this.cmbRunning.SelectedIndex == 1 && !spawn.SpawnIsRunning)
                {
                    flag1 = false;
                }
                else if (this.cmbRunning.SelectedIndex == 2 && spawn.SpawnIsRunning)
                {
                    flag1 = false;
                }
            }
            if (flag1 && this.chkAvgSpawnTime.Checked)
            {
                double num = (spawn.SpawnMinDelay + spawn.SpawnMaxDelay) / 2.0;
                if (this.cmbAvgSpawnTime.SelectedIndex == 0 && num >= (double)this.numAvgSpawnTime.Value)
                {
                    flag1 = false;
                }
                else if (this.cmbAvgSpawnTime.SelectedIndex == 1 && num <= (double)this.numAvgSpawnTime.Value)
                {
                    flag1 = false;
                }
            }
            string status_str;

            if (flag1 && this.txtPropertyTest.Text != null && (this.txtPropertyTest.Text.Trim().Length > 0 && !PropertyTest.CheckPropertyString((object)spawn, this.txtPropertyTest.Text, out status_str)))
            {
                flag1 = false;
            }
            if (flag1 && this.txtNotes.Text != null && this.txtNotes.Text.Trim().Length > 0)
            {
                bool flag2 = false;
                if (spawn.SpawnNotes != null && spawn.SpawnNotes.Length > 0 && spawn.SpawnNotes.ToLower().IndexOf(this.txtNotes.Text.ToLower()) >= 0)
                {
                    flag2 = true;
                }
                if (this.cmbNotes.SelectedIndex == 0)
                {
                    if (!flag2)
                    {
                        flag1 = false;
                    }
                }
                else if (flag2)
                {
                    flag1 = false;
                }
            }
            return(flag1);
        }