Ejemplo n.º 1
0
        public virtual DateTime?_0001()
        {
            //Discarded unreachable code: IL_0002
            //IL_0003: Incompatible stack heights: 0 vs 1
            switch (LoginComposer())
            {
            case WatcherComposer.None:
            case WatcherComposer.Null:
            case WatcherComposer.EndArray:
                return(null);

            case WatcherComposer.Date:
            {
                object obj = this._0001();
                if (obj is DateTimeOffset)
                {
                    CancelError(WatcherComposer.Date, ((DateTimeOffset)obj).DateTime, isstate: false);
                }
                return((DateTime)this._0001());
            }

            case WatcherComposer.String:
                return(DeleteError((string)this._0001()));

            default:
                throw ContextError.CheckComposer(this, "Error reading date. Unexpected token: {0}.".ListReader(CultureInfo.InvariantCulture, this._0001()));
            }
        }
Ejemplo n.º 2
0
        protected void InitError()
        {
            //Discarded unreachable code: IL_0002
            //IL_0003: Incompatible stack heights: 0 vs 1
            tagURLTEMPLATE tagURLTEMPLATE = RemoveError();

            switch (tagURLTEMPLATE)
            {
            case tagURLTEMPLATE.Object:
                resolverError = (MethodAttributes)4;
                break;

            case tagURLTEMPLATE.Array:
                resolverError = (MethodAttributes)6;
                break;

            case tagURLTEMPLATE.Constructor:
                resolverError = (MethodAttributes)10;
                break;

            case tagURLTEMPLATE.None:
                DefineError();
                break;

            default:
                throw ContextError.CheckComposer(this, "While setting the reader state back to current object an unexpected JsonType was encountered: {0}".ListReader(CultureInfo.InvariantCulture, tagURLTEMPLATE));
            }
        }
Ejemplo n.º 3
0
        public virtual DateTimeOffset?_0001()
        {
            //Discarded unreachable code: IL_0002
            //IL_0003: Incompatible stack heights: 0 vs 1
            WatcherComposer watcherComposer = LoginComposer();

            switch (watcherComposer)
            {
            case WatcherComposer.None:
            case WatcherComposer.Null:
            case WatcherComposer.EndArray:
                return(null);

            case WatcherComposer.Date:
            {
                object obj = this._0001();
                if (obj is DateTime)
                {
                    DateTime dateTime = (DateTime)obj;
                    CancelError(WatcherComposer.Date, new DateTimeOffset(dateTime), isstate: false);
                }
                return((DateTimeOffset)this._0001());
            }

            case WatcherComposer.String:
            {
                string info = (string)this._0001();
                return(ConcatError(info));
            }

            default:
                throw ContextError.CheckComposer(this, "Error reading date. Unexpected token: {0}.".ListReader(CultureInfo.InvariantCulture, watcherComposer));
            }
        }
Ejemplo n.º 4
0
        internal bool PublishError(ProcTest i, bool polstop)
        {
            //Discarded unreachable code: IL_0002
            //IL_0003: Incompatible stack heights: 0 vs 1
            if (polstop)
            {
                return(this._0001());
            }
            switch (i?.dicProperty ?? ((Docking)0))
            {
            case (Docking)0:
                return(WriteError());

            case (Docking)1:
                this._0001();
                break;

            case (Docking)2:
            {
                bool result = WriteError();
                if (this._0001() == WatcherComposer.Undefined)
                {
                    throw ContextError.CheckComposer(this, "An undefined token is not a valid {0}.".ListReader(CultureInfo.InvariantCulture, i?._0002() ?? typeof(long)));
                }
                return(result);
            }

            case (Docking)5:
                this._0001();
                break;

            case (Docking)8:
                this._0001();
                break;

            case (Docking)3:
                this._0001();
                break;

            case (Docking)9:
                this._0001();
                break;

            case (Docking)4:
                this._0001();
                break;

            case (Docking)6:
                this._0001();
                break;

            case (Docking)7:
                this._0001();
                break;

            default:
                throw new ArgumentOutOfRangeException();
            }
            return(this._0001() != WatcherComposer.None);
        }
Ejemplo n.º 5
0
        public virtual byte[] _0001()
        {
            //Discarded unreachable code: IL_0002
            //IL_0003: Incompatible stack heights: 0 vs 1
            WatcherComposer watcherComposer = LoginComposer();

            switch (watcherComposer)
            {
            case WatcherComposer.StartObject:
            {
                CountError();
                byte[] array3 = this._0001();
                InvokeError();
                if (this._0001() != WatcherComposer.EndObject)
                {
                    throw ContextError.CheckComposer(this, "Error reading bytes. Unexpected token: {0}.".ListReader(CultureInfo.InvariantCulture, this._0001()));
                }
                CancelError(WatcherComposer.Bytes, array3, isstate: false);
                return(array3);
            }

            case WatcherComposer.String:
            {
                string text = (string)this._0001();
                Guid   connection;
                byte[] array2 = (text.Length == 0) ? ObserverIteratorMapping.CheckProperty <byte>() : ((!HelperDicCandidate.VisitProperty(text, out connection)) ? Convert.FromBase64String(text) : connection.ToByteArray());
                CancelError(WatcherComposer.Bytes, array2, isstate: false);
                return(array2);
            }

            case WatcherComposer.None:
            case WatcherComposer.Null:
            case WatcherComposer.EndArray:
                return(null);

            case WatcherComposer.Bytes:
            {
                object obj = this._0001();
                if (obj is Guid)
                {
                    byte[] array = ((Guid)obj).ToByteArray();
                    CancelError(WatcherComposer.Bytes, array, isstate: false);
                    return(array);
                }
                return((byte[])this._0001());
            }

            case WatcherComposer.StartArray:
                return(ChangeError());

            default:
                throw ContextError.CheckComposer(this, "Error reading bytes. Unexpected token: {0}.".ListReader(CultureInfo.InvariantCulture, watcherComposer));
            }
        }
Ejemplo n.º 6
0
        public virtual int?_0001()
        {
            //Discarded unreachable code: IL_0002
            //IL_0003: Incompatible stack heights: 0 vs 1
            WatcherComposer watcherComposer = LoginComposer();

            switch (watcherComposer)
            {
            case WatcherComposer.None:
            case WatcherComposer.Null:
            case WatcherComposer.EndArray:
                return(null);

            case WatcherComposer.Integer:
            case WatcherComposer.Float:
            {
                object obj = this._0001();
                if (obj is int)
                {
                    return((int)obj);
                }
                int num;
                if (obj is BigInteger)
                {
                    BigInteger value = (BigInteger)obj;
                    num = (int)value;
                }
                else
                {
                    try
                    {
                        num = Convert.ToInt32(obj, CultureInfo.InvariantCulture);
                    }
                    catch (Exception field)
                    {
                        throw ContextError.DisableComposer(this, "Could not convert to integer: {0}.".ListReader(CultureInfo.InvariantCulture, obj), field);
                    }
                }
                CancelError(WatcherComposer.Integer, num, isstate: false);
                return(num);
            }

            case WatcherComposer.String:
            {
                string param = (string)this._0001();
                return(PostError(param));
            }

            default:
                throw ContextError.CheckComposer(this, "Error reading integer. Unexpected token: {0}.".ListReader(CultureInfo.InvariantCulture, watcherComposer));
            }
        }
Ejemplo n.º 7
0
 internal bool?StartError(string first)
 {
     //Discarded unreachable code: IL_0002
     //IL_0003: Incompatible stack heights: 0 vs 1
     if (SetterTest.StartReader(first))
     {
         CancelError(WatcherComposer.Null, null, isstate: false);
         return(null);
     }
     if (bool.TryParse(first, out bool result))
     {
         CancelError(WatcherComposer.Boolean, result, isstate: false);
         return(result);
     }
     CancelError(WatcherComposer.String, first, isstate: false);
     throw ContextError.CheckComposer(this, "Could not convert string to boolean: {0}.".ListReader(CultureInfo.InvariantCulture, first));
 }
Ejemplo n.º 8
0
 internal int?PostError(string param)
 {
     //Discarded unreachable code: IL_0002
     //IL_0003: Incompatible stack heights: 0 vs 1
     if (SetterTest.StartReader(param))
     {
         CancelError(WatcherComposer.Null, null, isstate: false);
         return(null);
     }
     if (int.TryParse(param, NumberStyles.Integer, this._0001(), out int result))
     {
         CancelError(WatcherComposer.Integer, result, isstate: false);
         return(result);
     }
     CancelError(WatcherComposer.String, param, isstate: false);
     throw ContextError.CheckComposer(this, "Could not convert string to integer: {0}.".ListReader(CultureInfo.InvariantCulture, param));
 }
Ejemplo n.º 9
0
 internal double?GetError(string first)
 {
     //Discarded unreachable code: IL_0002
     //IL_0003: Incompatible stack heights: 0 vs 1
     if (SetterTest.StartReader(first))
     {
         CancelError(WatcherComposer.Null, null, isstate: false);
         return(null);
     }
     if (double.TryParse(first, NumberStyles.AllowLeadingWhite | NumberStyles.AllowTrailingWhite | NumberStyles.AllowLeadingSign | NumberStyles.AllowDecimalPoint | NumberStyles.AllowThousands | NumberStyles.AllowExponent, this._0001(), out double result))
     {
         CancelError(WatcherComposer.Float, result, isstate: false);
         return(result);
     }
     CancelError(WatcherComposer.String, first, isstate: false);
     throw ContextError.CheckComposer(this, "Could not convert string to double: {0}.".ListReader(CultureInfo.InvariantCulture, first));
 }
Ejemplo n.º 10
0
        private tagURLTEMPLATE CollectError(WatcherComposer item)
        {
            //Discarded unreachable code: IL_0002
            //IL_0003: Incompatible stack heights: 0 vs 1
            switch (item)
            {
            case WatcherComposer.EndObject:
                return(tagURLTEMPLATE.Object);

            case WatcherComposer.EndArray:
                return(tagURLTEMPLATE.Array);

            case WatcherComposer.EndConstructor:
                return(tagURLTEMPLATE.Constructor);

            default:
                throw ContextError.CheckComposer(this, "Not a valid close JsonToken: {0}".ListReader(CultureInfo.InvariantCulture, item));
            }
        }
Ejemplo n.º 11
0
 internal void CountError()
 {
     //Discarded unreachable code: IL_0002
     //IL_0003: Incompatible stack heights: 0 vs 1
     InvokeError();
     if (this._0001() != null && this._0001().ToString() == "$type")
     {
         InvokeError();
         if (this._0001() != null && this._0001().ToString().StartsWith("System.Byte[]", StringComparison.Ordinal))
         {
             InvokeError();
             if (this._0001().ToString() == "$value")
             {
                 return;
             }
         }
     }
     throw ContextError.CheckComposer(this, "Error reading bytes. Unexpected token: {0}.".ListReader(CultureInfo.InvariantCulture, WatcherComposer.StartObject));
 }
Ejemplo n.º 12
0
        private void ManageError(WatcherComposer config)
        {
            //Discarded unreachable code: IL_0002
            //IL_0003: Incompatible stack heights: 0 vs 1
            tagURLTEMPLATE tagURLTEMPLATE = RateError();

            if (CollectError(config) != tagURLTEMPLATE)
            {
                throw ContextError.CheckComposer(this, "JsonToken {0} is not valid for closing JsonType {1}.".SelectReader(CultureInfo.InvariantCulture, config, tagURLTEMPLATE));
            }
            if (RemoveError() != 0 || _0004())
            {
                resolverError = (MethodAttributes)8;
            }
            else
            {
                DefineError();
            }
        }
Ejemplo n.º 13
0
        public virtual double?_0001()
        {
            //Discarded unreachable code: IL_0002
            //IL_0003: Incompatible stack heights: 0 vs 1
            WatcherComposer watcherComposer = LoginComposer();

            switch (watcherComposer)
            {
            case WatcherComposer.None:
            case WatcherComposer.Null:
            case WatcherComposer.EndArray:
                return(null);

            case WatcherComposer.Integer:
            case WatcherComposer.Float:
            {
                object obj = this._0001();
                if (obj is double)
                {
                    return((double)obj);
                }
                double num;
                if (obj is BigInteger)
                {
                    BigInteger value = (BigInteger)obj;
                    num = (double)value;
                }
                else
                {
                    num = Convert.ToDouble(obj, CultureInfo.InvariantCulture);
                }
                CancelError(WatcherComposer.Float, num, isstate: false);
                return(num);
            }

            case WatcherComposer.String:
                return(GetError((string)this._0001()));

            default:
                throw ContextError.CheckComposer(this, "Error reading double. Unexpected token: {0}.".ListReader(CultureInfo.InvariantCulture, watcherComposer));
            }
        }
Ejemplo n.º 14
0
        public virtual bool?_0001()
        {
            //Discarded unreachable code: IL_0002
            //IL_0003: Incompatible stack heights: 0 vs 1
            WatcherComposer watcherComposer = LoginComposer();

            switch (watcherComposer)
            {
            case WatcherComposer.None:
            case WatcherComposer.Null:
            case WatcherComposer.EndArray:
                return(null);

            case WatcherComposer.Integer:
            case WatcherComposer.Float:
            {
                object obj = this._0001();
                bool   flag;
                if (obj is BigInteger)
                {
                    BigInteger left = (BigInteger)obj;
                    flag = (left != 0L);
                }
                else
                {
                    flag = Convert.ToBoolean(this._0001(), CultureInfo.InvariantCulture);
                }
                CancelError(WatcherComposer.Boolean, flag, isstate: false);
                return(flag);
            }

            case WatcherComposer.String:
                return(StartError((string)this._0001()));

            case WatcherComposer.Boolean:
                return((bool)this._0001());

            default:
                throw ContextError.CheckComposer(this, "Error reading boolean. Unexpected token: {0}.".ListReader(CultureInfo.InvariantCulture, watcherComposer));
            }
        }
Ejemplo n.º 15
0
        public virtual string _0001()
        {
            //Discarded unreachable code: IL_0002
            //IL_0003: Incompatible stack heights: 0 vs 1
            WatcherComposer watcherComposer = LoginComposer();

            switch (watcherComposer)
            {
            case WatcherComposer.None:
            case WatcherComposer.Null:
            case WatcherComposer.EndArray:
                return(null);

            case WatcherComposer.String:
                return((string)this._0001());

            default:
                if (RulesClientBridge.StartIssuer(watcherComposer))
                {
                    object obj = this._0001();
                    if (obj != null)
                    {
                        IFormattable formattable = obj as IFormattable;
                        string       text;
                        if (formattable != null)
                        {
                            text = formattable.ToString(null, this._0001());
                        }
                        else
                        {
                            Uri uri = obj as Uri;
                            text = (((object)uri != null) ? uri.OriginalString : obj.ToString());
                        }
                        CancelError(WatcherComposer.String, text, isstate: false);
                        return(text);
                    }
                }
                throw ContextError.CheckComposer(this, "Error reading string. Unexpected token: {0}.".ListReader(CultureInfo.InvariantCulture, watcherComposer));
            }
        }
Ejemplo n.º 16
0
 internal DateTimeOffset?ConcatError(string info)
 {
     //Discarded unreachable code: IL_0002
     //IL_0003: Incompatible stack heights: 0 vs 1
     if (SetterTest.StartReader(info))
     {
         CancelError(WatcherComposer.Null, null, isstate: false);
         return(null);
     }
     if (DescriptorIteratorMapping.ChangeProperty(info, setterError, this._0001(), out DateTimeOffset connection))
     {
         CancelError(WatcherComposer.Date, connection, isstate: false);
         return(connection);
     }
     if (DateTimeOffset.TryParse(info, this._0001(), DateTimeStyles.RoundtripKind, out connection))
     {
         CancelError(WatcherComposer.Date, connection, isstate: false);
         return(connection);
     }
     CancelError(WatcherComposer.String, info, isstate: false);
     throw ContextError.CheckComposer(this, "Could not convert string to DateTimeOffset: {0}.".ListReader(CultureInfo.InvariantCulture, info));
 }
Ejemplo n.º 17
0
 internal decimal?SelectError(string first)
 {
     //Discarded unreachable code: IL_0002
     //IL_0003: Incompatible stack heights: 0 vs 1
     if (SetterTest.StartReader(first))
     {
         CancelError(WatcherComposer.Null, null, isstate: false);
         return(null);
     }
     if (decimal.TryParse(first, NumberStyles.Number, this._0001(), out decimal result))
     {
         CancelError(WatcherComposer.Float, result, isstate: false);
         return(result);
     }
     if (HelperDicCandidate.LogoutProperty(first.ToCharArray(), 0, first.Length, out result) == (TYMED)1)
     {
         CancelError(WatcherComposer.Float, result, isstate: false);
         return(result);
     }
     CancelError(WatcherComposer.String, first, isstate: false);
     throw ContextError.CheckComposer(this, "Could not convert string to decimal: {0}.".ListReader(CultureInfo.InvariantCulture, first));
 }
Ejemplo n.º 18
0
 private void SetError(tagURLTEMPLATE ident)
 {
     //Discarded unreachable code: IL_0002
     //IL_0003: Incompatible stack heights: 0 vs 1
     SetupError();
     if (_PoolError._RegistryError == tagURLTEMPLATE.None)
     {
         _PoolError = new QueueError(ident);
         return;
     }
     if (workerError == null)
     {
         workerError = new List <QueueError>();
     }
     workerError.Add(_PoolError);
     _PoolError = new QueueError(ident);
     if (!definitionError.HasValue || !(this._0003() + 1 > definitionError) || m_SystemError)
     {
         return;
     }
     m_SystemError = true;
     throw ContextError.CheckComposer(this, "The reader's MaxDepth of {0} has been exceeded.".ListReader(CultureInfo.InvariantCulture, definitionError));
 }
Ejemplo n.º 19
0
 internal DateTime?DeleteError(string info)
 {
     //Discarded unreachable code: IL_0002
     //IL_0003: Incompatible stack heights: 0 vs 1
     if (SetterTest.StartReader(info))
     {
         CancelError(WatcherComposer.Null, null, isstate: false);
         return(null);
     }
     if (DescriptorIteratorMapping.RemoveProperty(info, this._0001(), setterError, this._0001(), out DateTime res))
     {
         res = DescriptorIteratorMapping.ReadProperty(res, this._0001());
         CancelError(WatcherComposer.Date, res, isstate: false);
         return(res);
     }
     if (DateTime.TryParse(info, this._0001(), DateTimeStyles.RoundtripKind, out res))
     {
         res = DescriptorIteratorMapping.ReadProperty(res, this._0001());
         CancelError(WatcherComposer.Date, res, isstate: false);
         return(res);
     }
     throw ContextError.CheckComposer(this, "Could not convert string to DateTime: {0}.".ListReader(CultureInfo.InvariantCulture, info));
 }
Ejemplo n.º 20
0
        private bool CalculateError(List <byte> reference)
        {
            //Discarded unreachable code: IL_0002
            //IL_0003: Incompatible stack heights: 0 vs 1
            switch (this._0001())
            {
            case WatcherComposer.None:
                throw ContextError.CheckComposer(this, "Unexpected end when reading bytes.");

            case WatcherComposer.Integer:
                reference.Add(Convert.ToByte(this._0001(), CultureInfo.InvariantCulture));
                return(false);

            case WatcherComposer.EndArray:
                return(true);

            case WatcherComposer.Comment:
                return(false);

            default:
                throw ContextError.CheckComposer(this, "Unexpected token when reading bytes: {0}.".ListReader(CultureInfo.InvariantCulture, this._0001()));
            }
        }
Ejemplo n.º 21
0
 internal ContextError PrintError()
 {
     //Discarded unreachable code: IL_0002
     //IL_0003: Incompatible stack heights: 0 vs 1
     return(ContextError.CheckComposer(this, "Unexpected end when reading JSON."));
 }