Exemple #1
0
        // Token: 0x060018C4 RID: 6340 RVA: 0x000432E0 File Offset: 0x000414E0
        public Class186 method_1(Struct43 expectedHash)
        {
            Class186 @class = this.method_0();

            lock (((ICollection)this.Patches).SyncRoot)
            {
                for (int i = this.Patches.Count - 1; i >= 0; i--)
                {
                    if (Struct43.smethod_5(expectedHash, this.Patches[i].ExpectedHash))
                    {
                        while (i < this.Patches.Count)
                        {
                            @class.Patches.Add(this.Patches[i].imethod_0());
                            i++;
                        }
                        break;
                    }
                }
            }
            return(@class);
        }
Exemple #2
0
        // Token: 0x060018C8 RID: 6344 RVA: 0x000434B8 File Offset: 0x000416B8
        public Enum23 method_5(Class186 lastFile, string filename, out Struct43 actualFileHash)
        {
            actualFileHash = default(Struct43);
            Enum23 result;

            try
            {
                if (File.Exists(filename))
                {
                    if (!this.ForceRecheck && !lastFile.ForceRecheck && !(this.Version != lastFile.Version))
                    {
                        if (this.ExpectedSize == Class234.smethod_11(filename))
                        {
                            return(Enum23.const_2);
                        }
                    }
                    actualFileHash = Class513.smethod_0(filename);
                    if (Struct43.smethod_5(this.ExpectedHash, actualFileHash))
                    {
                        result = Enum23.const_2;
                    }
                    else
                    {
                        result = Enum23.const_1;
                    }
                }
                else
                {
                    result = Enum23.const_0;
                }
            }
            finally
            {
                this.ForceRecheck = false;
            }
            return(result);
        }
Exemple #3
0
        private void method_4(string string_0, JsonWriter jsonWriter_1, JsonSchemaType jsonSchemaType_0)
        {
            IList <JsonSchemaType> list;

            if (Enum.IsDefined(typeof(JsonSchemaType), jsonSchemaType_0))
            {
                list = new List <JsonSchemaType> {
                    jsonSchemaType_0
                };
            }
            else
            {
                if (func_0 == null)
                {
                    func_0 = new Func <JsonSchemaType, bool>(Class125.smethod_0);
                }
                list = Class186.smethod_0 <JsonSchemaType>(jsonSchemaType_0).Where <JsonSchemaType>(func_0).ToList <JsonSchemaType>();
            }
            if (list.Count != 0)
            {
                jsonWriter_1.WritePropertyName(string_0);
                if (list.Count == 1)
                {
                    jsonWriter_1.WriteValue(Class130.smethod_1(list[0]));
                }
                else
                {
                    jsonWriter_1.WriteStartArray();
                    foreach (JsonSchemaType type in list)
                    {
                        jsonWriter_1.WriteValue(Class130.smethod_1(type));
                    }
                    jsonWriter_1.WriteEndArray();
                }
            }
        }