예제 #1
0
 void eCX()
 {
     System.Web.Security.MembershipPasswordException qTY = new System.Web.Security.MembershipPasswordException();
     System.Exception tOOK = new System.Exception();
     System.Threading.SynchronizationContext            MaH     = new System.Threading.SynchronizationContext();
     System.Web.UI.WebControls.WebParts.PageCatalogPart ayRmRe  = new System.Web.UI.WebControls.WebParts.PageCatalogPart();
     System.Web.Security.DefaultAuthenticationModule    Exmkenb = new System.Web.Security.DefaultAuthenticationModule();
     System.Web.SessionState.SessionStateModule         TmbqbT  = new System.Web.SessionState.SessionStateModule();
     System.ResolveEventArgs cGQ = new System.ResolveEventArgs("oYfQTFJiOZSVw");
     System.Web.UI.ControlValuePropertyAttribute LIX = new System.Web.UI.ControlValuePropertyAttribute("zCbHRvFJUat", 910602186);
     System.Runtime.InteropServices.SetWin32ContextInIDispatchAttribute rfLFm = new System.Runtime.InteropServices.SetWin32ContextInIDispatchAttribute();
     System.Net.HttpListenerException                         tIez            = new System.Net.HttpListenerException(2135436060, "NJgG");
     System.WeakReference                                     mKrXQJ          = new System.WeakReference(1723804374);
     System.Web.Configuration.OutputCacheProfile              atJh            = new System.Web.Configuration.OutputCacheProfile("ArZxwFnPdDdni");
     System.ParamArrayAttribute                               TyUXndy         = new System.ParamArrayAttribute();
     System.Runtime.Serialization.OnDeserializingAttribute    lVgFArZ         = new System.Runtime.Serialization.OnDeserializingAttribute();
     System.Data.SqlTypes.TypeNumericSchemaImporterExtension  QbBDir          = new System.Data.SqlTypes.TypeNumericSchemaImporterExtension();
     System.Windows.Forms.ListViewGroup                       MvRc            = new System.Windows.Forms.ListViewGroup("ELItUnvMGVWDmEGD");
     System.ComponentModel.Design.CheckoutException           NwMcuF          = new System.ComponentModel.Design.CheckoutException("QdlJvFMgCKYGHpcTb");
     System.Globalization.RegionInfo                          tAChNgq         = new System.Globalization.RegionInfo(2015922813);
     System.Web.UI.WebControls.ValidationSummary              kcldBEv         = new System.Web.UI.WebControls.ValidationSummary();
     System.Windows.Forms.RelatedImageListAttribute           PFSRAV          = new System.Windows.Forms.RelatedImageListAttribute("ZtfKTawcAmWr");
     System.Web.UI.WebControls.TableSectionStyle              ehekxI          = new System.Web.UI.WebControls.TableSectionStyle();
     System.ComponentModel.ByteConverter                      oodnW           = new System.ComponentModel.ByteConverter();
     System.Web.UI.WebControls.DetailsViewPageEventArgs       NFia            = new System.Web.UI.WebControls.DetailsViewPageEventArgs(599344366);
     System.Runtime.Remoting.Metadata.W3cXsd2001.SoapNotation Savfrr          = new System.Runtime.Remoting.Metadata.W3cXsd2001.SoapNotation();
 }
예제 #2
0
        private static void WriteInt32(Stream stream, UInt32 val)
        {
            System.ComponentModel.ByteConverter bc = new System.ComponentModel.ByteConverter();

            byte[] buffer = new byte[4];
            buffer[0] = (byte)((val & 0xFF000000) >> 24);
            buffer[1] = (byte)((val & 0xFF0000) >> 16);
            buffer[2] = (byte)((val & 0xFF00) >> 8);
            buffer[3] = (byte)(val & 0xFF);
            stream.Write(buffer, 0, buffer.Length);
        }
        public static bool _ConvertTo_System_ComponentModel_ByteConverter_System_ComponentModel_ITypeDescriptorContext_System_Globalization_CultureInfo_System_Object_System_Type( )
        {
            //class object
            System.ComponentModel.ByteConverter _System_ComponentModel_ByteConverter = new System.ComponentModel.ByteConverter();

            //Parameters
            System.ComponentModel.ITypeDescriptorContext context = null;
            System.Globalization.CultureInfo             culture = null;
            System.Object _value          = null;
            System.Type   destinationType = null;

            //ReturnType/Value
            System.Object returnVal_Real        = null;
            System.Object returnVal_Intercepted = null;

            //Exception
            System.Exception exception_Real        = null;
            System.Exception exception_Intercepted = null;

            InterceptionMaintenance.disableInterception( );

            try
            {
                returnVal_Real = _System_ComponentModel_ByteConverter.ConvertTo(context, culture, _value, destinationType);
            }

            catch (System.Exception e)
            {
                exception_Real = e;
            }


            InterceptionMaintenance.enableInterception( );

            try
            {
                returnVal_Intercepted = _System_ComponentModel_ByteConverter.ConvertTo(context, culture, _value, destinationType);
            }

            catch (System.Exception e)
            {
                exception_Intercepted = e;
            }


            return((exception_Real.Messsage == exception_Intercepted.Message) && (returnValue_Real == returnValue_Intercepted));
        }
        public static bool _ConvertFromString_System_ComponentModel_ByteConverter_System_ComponentModel_ITypeDescriptorContext_System_String( )
        {
            //class object
            System.ComponentModel.ByteConverter _System_ComponentModel_ByteConverter = new System.ComponentModel.ByteConverter();

            //Parameters
            System.ComponentModel.ITypeDescriptorContext context = null;
            System.String text = null;

            //ReturnType/Value
            System.Object returnVal_Real        = null;
            System.Object returnVal_Intercepted = null;

            //Exception
            System.Exception exception_Real        = null;
            System.Exception exception_Intercepted = null;

            InterceptionMaintenance.disableInterception( );

            try
            {
                returnVal_Real = _System_ComponentModel_ByteConverter.ConvertFromString(context, text);
            }

            catch (System.Exception e)
            {
                exception_Real = e;
            }


            InterceptionMaintenance.enableInterception( );

            try
            {
                returnVal_Intercepted = _System_ComponentModel_ByteConverter.ConvertFromString(context, text);
            }

            catch (System.Exception e)
            {
                exception_Intercepted = e;
            }


            return((exception_Real.Messsage == exception_Intercepted.Message) && (returnValue_Real == returnValue_Intercepted));
        }
        public static bool _CreateInstance_System_ComponentModel_ByteConverter_System_ComponentModel_ITypeDescriptorContext_System_Collections_IDictionary( )
        {
            //class object
            System.ComponentModel.ByteConverter _System_ComponentModel_ByteConverter = new System.ComponentModel.ByteConverter();

            //Parameters
            System.ComponentModel.ITypeDescriptorContext context = null;
            System.Collections.IDictionary propertyValues        = null;

            //ReturnType/Value
            System.Object returnVal_Real        = null;
            System.Object returnVal_Intercepted = null;

            //Exception
            System.Exception exception_Real        = null;
            System.Exception exception_Intercepted = null;

            InterceptionMaintenance.disableInterception( );

            try
            {
                returnVal_Real = _System_ComponentModel_ByteConverter.CreateInstance(context, propertyValues);
            }

            catch (System.Exception e)
            {
                exception_Real = e;
            }


            InterceptionMaintenance.enableInterception( );

            try
            {
                returnVal_Intercepted = _System_ComponentModel_ByteConverter.CreateInstance(context, propertyValues);
            }

            catch (System.Exception e)
            {
                exception_Intercepted = e;
            }


            return((exception_Real.Messsage == exception_Intercepted.Message) && (returnValue_Real == returnValue_Intercepted));
        }
        public static bool _ConvertTo_System_ComponentModel_ByteConverter_System_ComponentModel_ITypeDescriptorContext_System_Globalization_CultureInfo_System_Object_System_Type( )
        {
            //class object
            System.ComponentModel.ByteConverter _System_ComponentModel_ByteConverter = new System.ComponentModel.ByteConverter();

               //Parameters
               System.ComponentModel.ITypeDescriptorContext context = null;
               System.Globalization.CultureInfo culture = null;
               System.Object _value = null;
               System.Type destinationType = null;

               //ReturnType/Value
               System.Object returnVal_Real = null;
               System.Object returnVal_Intercepted = null;

               //Exception
               System.Exception exception_Real = null;
               System.Exception exception_Intercepted = null;

               InterceptionMaintenance.disableInterception( );

               try
               {
              returnVal_Real = _System_ComponentModel_ByteConverter.ConvertTo(context,culture,_value,destinationType);
               }

               catch( System.Exception e )
               {
              exception_Real = e;
               }

               InterceptionMaintenance.enableInterception( );

               try
               {
              returnVal_Intercepted = _System_ComponentModel_ByteConverter.ConvertTo(context,culture,_value,destinationType);
               }

               catch( System.Exception e )
               {
              exception_Intercepted = e;
               }

               return( ( exception_Real.Messsage == exception_Intercepted.Message ) && ( returnValue_Real == returnValue_Intercepted ) );
        }
        public static bool _GetProperties_System_ComponentModel_ByteConverter_System_ComponentModel_ITypeDescriptorContext_System_Object( )
        {
            //class object
            System.ComponentModel.ByteConverter _System_ComponentModel_ByteConverter = new System.ComponentModel.ByteConverter();

            //Parameters
            System.ComponentModel.ITypeDescriptorContext context = null;
            System.Object _value = null;

            //ReturnType/Value
            System.ComponentModel.PropertyDescriptorCollection returnVal_Real        = null;
            System.ComponentModel.PropertyDescriptorCollection returnVal_Intercepted = null;

            //Exception
            System.Exception exception_Real        = null;
            System.Exception exception_Intercepted = null;

            InterceptionMaintenance.disableInterception( );

            try
            {
                returnVal_Real = _System_ComponentModel_ByteConverter.GetProperties(context, _value);
            }

            catch (System.Exception e)
            {
                exception_Real = e;
            }


            InterceptionMaintenance.enableInterception( );

            try
            {
                returnVal_Intercepted = _System_ComponentModel_ByteConverter.GetProperties(context, _value);
            }

            catch (System.Exception e)
            {
                exception_Intercepted = e;
            }


            return((exception_Real.Messsage == exception_Intercepted.Message) && (returnValue_Real == returnValue_Intercepted));
        }
예제 #8
0
        public static bool _CanConvertTo_System_ComponentModel_ByteConverter_System_Type( )
        {
            //class object
            System.ComponentModel.ByteConverter _System_ComponentModel_ByteConverter = new System.ComponentModel.ByteConverter();

            //Parameters
            System.Type destinationType = null;

            //ReturnType/Value
            System.Boolean returnVal_Real        = false;
            System.Boolean returnVal_Intercepted = false;

            //Exception
            System.Exception exception_Real        = null;
            System.Exception exception_Intercepted = null;

            InterceptionMaintenance.disableInterception( );

            try
            {
                returnVal_Real = _System_ComponentModel_ByteConverter.CanConvertTo(destinationType);
            }

            catch (System.Exception e)
            {
                exception_Real = e;
            }


            InterceptionMaintenance.enableInterception( );

            try
            {
                returnVal_Intercepted = _System_ComponentModel_ByteConverter.CanConvertTo(destinationType);
            }

            catch (System.Exception e)
            {
                exception_Intercepted = e;
            }


            return((exception_Real.Messsage == exception_Intercepted.Message) && (returnValue_Real == returnValue_Intercepted));
        }
        public static bool _GetStandardValuesSupported_System_ComponentModel_ByteConverter_System_ComponentModel_ITypeDescriptorContext( )
        {
            //class object
            System.ComponentModel.ByteConverter _System_ComponentModel_ByteConverter = new System.ComponentModel.ByteConverter();

            //Parameters
            System.ComponentModel.ITypeDescriptorContext context = null;

            //ReturnType/Value
            System.Boolean returnVal_Real        = false;
            System.Boolean returnVal_Intercepted = false;

            //Exception
            System.Exception exception_Real        = null;
            System.Exception exception_Intercepted = null;

            InterceptionMaintenance.disableInterception( );

            try
            {
                returnVal_Real = _System_ComponentModel_ByteConverter.GetStandardValuesSupported(context);
            }

            catch (System.Exception e)
            {
                exception_Real = e;
            }


            InterceptionMaintenance.enableInterception( );

            try
            {
                returnVal_Intercepted = _System_ComponentModel_ByteConverter.GetStandardValuesSupported(context);
            }

            catch (System.Exception e)
            {
                exception_Intercepted = e;
            }


            return((exception_Real.Messsage == exception_Intercepted.Message) && (returnValue_Real == returnValue_Intercepted));
        }
예제 #10
0
        public static bool _ConvertToInvariantString_System_ComponentModel_ByteConverter_System_Object( )
        {
            //class object
            System.ComponentModel.ByteConverter _System_ComponentModel_ByteConverter = new System.ComponentModel.ByteConverter();

            //Parameters
            System.Object _value = null;

            //ReturnType/Value
            System.String returnVal_Real        = null;
            System.String returnVal_Intercepted = null;

            //Exception
            System.Exception exception_Real        = null;
            System.Exception exception_Intercepted = null;

            InterceptionMaintenance.disableInterception( );

            try
            {
                returnVal_Real = _System_ComponentModel_ByteConverter.ConvertToInvariantString(_value);
            }

            catch (System.Exception e)
            {
                exception_Real = e;
            }


            InterceptionMaintenance.enableInterception( );

            try
            {
                returnVal_Intercepted = _System_ComponentModel_ByteConverter.ConvertToInvariantString(_value);
            }

            catch (System.Exception e)
            {
                exception_Intercepted = e;
            }


            return((exception_Real.Messsage == exception_Intercepted.Message) && (returnValue_Real == returnValue_Intercepted));
        }
        public static bool _GetProperties_System_ComponentModel_ByteConverter_System_ComponentModel_ITypeDescriptorContext_System_Object( )
        {
            //class object
            System.ComponentModel.ByteConverter _System_ComponentModel_ByteConverter = new System.ComponentModel.ByteConverter();

               //Parameters
               System.ComponentModel.ITypeDescriptorContext context = null;
               System.Object _value = null;

               //ReturnType/Value
               System.ComponentModel.PropertyDescriptorCollection returnVal_Real = null;
               System.ComponentModel.PropertyDescriptorCollection returnVal_Intercepted = null;

               //Exception
               System.Exception exception_Real = null;
               System.Exception exception_Intercepted = null;

               InterceptionMaintenance.disableInterception( );

               try
               {
              returnVal_Real = _System_ComponentModel_ByteConverter.GetProperties(context,_value);
               }

               catch( System.Exception e )
               {
              exception_Real = e;
               }

               InterceptionMaintenance.enableInterception( );

               try
               {
              returnVal_Intercepted = _System_ComponentModel_ByteConverter.GetProperties(context,_value);
               }

               catch( System.Exception e )
               {
              exception_Intercepted = e;
               }

               return( ( exception_Real.Messsage == exception_Intercepted.Message ) && ( returnValue_Real == returnValue_Intercepted ) );
        }
        public static bool _ConvertFromString_System_ComponentModel_ByteConverter_System_ComponentModel_ITypeDescriptorContext_System_String( )
        {
            //class object
            System.ComponentModel.ByteConverter _System_ComponentModel_ByteConverter = new System.ComponentModel.ByteConverter();

               //Parameters
               System.ComponentModel.ITypeDescriptorContext context = null;
               System.String text = null;

               //ReturnType/Value
               System.Object returnVal_Real = null;
               System.Object returnVal_Intercepted = null;

               //Exception
               System.Exception exception_Real = null;
               System.Exception exception_Intercepted = null;

               InterceptionMaintenance.disableInterception( );

               try
               {
              returnVal_Real = _System_ComponentModel_ByteConverter.ConvertFromString(context,text);
               }

               catch( System.Exception e )
               {
              exception_Real = e;
               }

               InterceptionMaintenance.enableInterception( );

               try
               {
              returnVal_Intercepted = _System_ComponentModel_ByteConverter.ConvertFromString(context,text);
               }

               catch( System.Exception e )
               {
              exception_Intercepted = e;
               }

               return( ( exception_Real.Messsage == exception_Intercepted.Message ) && ( returnValue_Real == returnValue_Intercepted ) );
        }
예제 #13
0
        public static bool _GetStandardValues_System_ComponentModel_ByteConverter( )
        {
            //class object
            System.ComponentModel.ByteConverter _System_ComponentModel_ByteConverter = new System.ComponentModel.ByteConverter();

            //Parameters

            //ReturnType/Value
            System.Collections.ICollection returnVal_Real        = null;
            System.Collections.ICollection returnVal_Intercepted = null;

            //Exception
            System.Exception exception_Real        = null;
            System.Exception exception_Intercepted = null;

            InterceptionMaintenance.disableInterception( );

            try
            {
                returnVal_Real = _System_ComponentModel_ByteConverter.GetStandardValues();
            }

            catch (System.Exception e)
            {
                exception_Real = e;
            }


            InterceptionMaintenance.enableInterception( );

            try
            {
                returnVal_Intercepted = _System_ComponentModel_ByteConverter.GetStandardValues();
            }

            catch (System.Exception e)
            {
                exception_Intercepted = e;
            }


            return((exception_Real.Messsage == exception_Intercepted.Message) && (returnValue_Real == returnValue_Intercepted));
        }
        public static bool _CreateInstance_System_ComponentModel_ByteConverter_System_ComponentModel_ITypeDescriptorContext_System_Collections_IDictionary( )
        {
            //class object
            System.ComponentModel.ByteConverter _System_ComponentModel_ByteConverter = new System.ComponentModel.ByteConverter();

               //Parameters
               System.ComponentModel.ITypeDescriptorContext context = null;
               System.Collections.IDictionary propertyValues = null;

               //ReturnType/Value
               System.Object returnVal_Real = null;
               System.Object returnVal_Intercepted = null;

               //Exception
               System.Exception exception_Real = null;
               System.Exception exception_Intercepted = null;

               InterceptionMaintenance.disableInterception( );

               try
               {
              returnVal_Real = _System_ComponentModel_ByteConverter.CreateInstance(context,propertyValues);
               }

               catch( System.Exception e )
               {
              exception_Real = e;
               }

               InterceptionMaintenance.enableInterception( );

               try
               {
              returnVal_Intercepted = _System_ComponentModel_ByteConverter.CreateInstance(context,propertyValues);
               }

               catch( System.Exception e )
               {
              exception_Intercepted = e;
               }

               return( ( exception_Real.Messsage == exception_Intercepted.Message ) && ( returnValue_Real == returnValue_Intercepted ) );
        }
        public static bool _CanConvertTo_System_ComponentModel_ByteConverter_System_Type( )
        {
            //class object
            System.ComponentModel.ByteConverter _System_ComponentModel_ByteConverter = new System.ComponentModel.ByteConverter();

               //Parameters
               System.Type destinationType = null;

               //ReturnType/Value
               System.Boolean returnVal_Real = false;
               System.Boolean returnVal_Intercepted = false;

               //Exception
               System.Exception exception_Real = null;
               System.Exception exception_Intercepted = null;

               InterceptionMaintenance.disableInterception( );

               try
               {
              returnVal_Real = _System_ComponentModel_ByteConverter.CanConvertTo(destinationType);
               }

               catch( System.Exception e )
               {
              exception_Real = e;
               }

               InterceptionMaintenance.enableInterception( );

               try
               {
              returnVal_Intercepted = _System_ComponentModel_ByteConverter.CanConvertTo(destinationType);
               }

               catch( System.Exception e )
               {
              exception_Intercepted = e;
               }

               return( ( exception_Real.Messsage == exception_Intercepted.Message ) && ( returnValue_Real == returnValue_Intercepted ) );
        }
        public static bool _ConvertToInvariantString_System_ComponentModel_ByteConverter_System_Object( )
        {
            //class object
            System.ComponentModel.ByteConverter _System_ComponentModel_ByteConverter = new System.ComponentModel.ByteConverter();

               //Parameters
               System.Object _value = null;

               //ReturnType/Value
               System.String returnVal_Real = null;
               System.String returnVal_Intercepted = null;

               //Exception
               System.Exception exception_Real = null;
               System.Exception exception_Intercepted = null;

               InterceptionMaintenance.disableInterception( );

               try
               {
              returnVal_Real = _System_ComponentModel_ByteConverter.ConvertToInvariantString(_value);
               }

               catch( System.Exception e )
               {
              exception_Real = e;
               }

               InterceptionMaintenance.enableInterception( );

               try
               {
              returnVal_Intercepted = _System_ComponentModel_ByteConverter.ConvertToInvariantString(_value);
               }

               catch( System.Exception e )
               {
              exception_Intercepted = e;
               }

               return( ( exception_Real.Messsage == exception_Intercepted.Message ) && ( returnValue_Real == returnValue_Intercepted ) );
        }
        public static bool _GetStandardValuesSupported_System_ComponentModel_ByteConverter_System_ComponentModel_ITypeDescriptorContext( )
        {
            //class object
            System.ComponentModel.ByteConverter _System_ComponentModel_ByteConverter = new System.ComponentModel.ByteConverter();

               //Parameters
               System.ComponentModel.ITypeDescriptorContext context = null;

               //ReturnType/Value
               System.Boolean returnVal_Real = false;
               System.Boolean returnVal_Intercepted = false;

               //Exception
               System.Exception exception_Real = null;
               System.Exception exception_Intercepted = null;

               InterceptionMaintenance.disableInterception( );

               try
               {
              returnVal_Real = _System_ComponentModel_ByteConverter.GetStandardValuesSupported(context);
               }

               catch( System.Exception e )
               {
              exception_Real = e;
               }

               InterceptionMaintenance.enableInterception( );

               try
               {
              returnVal_Intercepted = _System_ComponentModel_ByteConverter.GetStandardValuesSupported(context);
               }

               catch( System.Exception e )
               {
              exception_Intercepted = e;
               }

               return( ( exception_Real.Messsage == exception_Intercepted.Message ) && ( returnValue_Real == returnValue_Intercepted ) );
        }
        public static bool _GetStandardValues_System_ComponentModel_ByteConverter( )
        {
            //class object
            System.ComponentModel.ByteConverter _System_ComponentModel_ByteConverter = new System.ComponentModel.ByteConverter();

               //Parameters

               //ReturnType/Value
               System.Collections.ICollection returnVal_Real = null;
               System.Collections.ICollection returnVal_Intercepted = null;

               //Exception
               System.Exception exception_Real = null;
               System.Exception exception_Intercepted = null;

               InterceptionMaintenance.disableInterception( );

               try
               {
              returnVal_Real = _System_ComponentModel_ByteConverter.GetStandardValues();
               }

               catch( System.Exception e )
               {
              exception_Real = e;
               }

               InterceptionMaintenance.enableInterception( );

               try
               {
              returnVal_Intercepted = _System_ComponentModel_ByteConverter.GetStandardValues();
               }

               catch( System.Exception e )
               {
              exception_Intercepted = e;
               }

               return( ( exception_Real.Messsage == exception_Intercepted.Message ) && ( returnValue_Real == returnValue_Intercepted ) );
        }
예제 #19
0
        public static bool _ctor_System_ComponentModel_ByteConverter( )
        {
            //class object
            System.ComponentModel.ByteConverter _System_ComponentModel_ByteConverter = new System.ComponentModel.ByteConverter();

            //Parameters


            //Exception
            System.Exception exception_Real        = null;
            System.Exception exception_Intercepted = null;

            InterceptionMaintenance.disableInterception( );

            try
            {
                _System_ComponentModel_ByteConverter.ctor();
            }

            catch (System.Exception e)
            {
                exception_Real = e;
            }


            InterceptionMaintenance.enableInterception( );

            try
            {
                _System_ComponentModel_ByteConverter.ctor();
            }

            catch (System.Exception e)
            {
                exception_Intercepted = e;
            }


            return((exception_Real.Message == exception_Intercepted.Message));
        }
예제 #20
0
파일: Mp3StreamOLD.cs 프로젝트: rejc2/utils
        /// <summary>
        /// Dequeues bytes out of the buffer in 16-it stereo PCM format (16-bit values with alternating channels)
        /// </summary>
        public int DequeueAs16BitPcmStereo(byte[] buffer, int offset, int count)
        {
            System.ComponentModel.ByteConverter bc = new System.ComponentModel.ByteConverter();
            if (count % 2 == 1)
            {
                count--;
            }
            int firstOffset   = offset;
            int lastOffset    = count + offset;
            int channelNumber = -1;

            while (offset < lastOffset)
            {
                channelNumber++; channelNumber %= ChannelQueue.Length;
                short  sample = (short)ChannelQueue[channelNumber].Dequeue();
                byte[] bytes  = BitConverter.GetBytes(sample);
                buffer[offset + 0] = bytes[0];
                buffer[offset + 1] = bytes[1];
                offset            += 2;
            }
            return(offset - firstOffset);
        }
        public static bool _ctor_System_ComponentModel_ByteConverter( )
        {
            //class object
            System.ComponentModel.ByteConverter _System_ComponentModel_ByteConverter = new System.ComponentModel.ByteConverter();

               //Parameters

               //Exception
               System.Exception exception_Real = null;
               System.Exception exception_Intercepted = null;

               InterceptionMaintenance.disableInterception( );

               try
               {
              _System_ComponentModel_ByteConverter.ctor();
               }

               catch( System.Exception e )
               {
              exception_Real = e;
               }

               InterceptionMaintenance.enableInterception( );

               try
               {
              _System_ComponentModel_ByteConverter.ctor();
               }

               catch( System.Exception e )
               {
              exception_Intercepted = e;
               }

               return( ( exception_Real.Message == exception_Intercepted.Message ));
        }
예제 #22
0
        private static void WriteInt32(Stream stream, UInt32 val)
        {
            System.ComponentModel.ByteConverter bc = new System.ComponentModel.ByteConverter();

            byte[] buffer = new byte[4];
            buffer[0] = (byte)((val & 0xFF000000) >> 24);
            buffer[1] = (byte)((val & 0xFF0000) >> 16);
            buffer[2] = (byte)((val & 0xFF00) >> 8);
            buffer[3] = (byte)(val & 0xFF);
            stream.Write(buffer, 0, buffer.Length);
        }
예제 #23
0
 /// <summary>
 /// Dequeues bytes out of the buffer in 16-it stereo PCM format (16-bit values with alternating channels)
 /// </summary>
 public int DequeueAs16BitPcmStereo(byte[] buffer, int offset, int count)
 {
     System.ComponentModel.ByteConverter bc =  new System.ComponentModel.ByteConverter();
     if (count %2 == 1) count--;
     int firstOffset = offset;
     int lastOffset = count + offset;
     int channelNumber = -1;
     while (offset < lastOffset)
     {
         channelNumber++; channelNumber %= ChannelQueue.Length;
         short sample = (short)ChannelQueue[channelNumber].Dequeue();
         byte[] bytes = BitConverter.GetBytes(sample);
         buffer[offset+0] = bytes[0];
         buffer[offset+1] = bytes[1];
         offset += 2;
     }
     return offset - firstOffset;
 }
예제 #24
0
        public int ProcessArguments(string[] args)
        {
            // Make errors printed by EC plugin visible
            var traceListener = new ConsoleTraceListener(true);
            Debug.Listeners.Add(traceListener);

            var converter = new System.ComponentModel.ByteConverter();
            try {
                if (args.Length > 0 && args[0] == "ec-write") {
                    if (args.Length == 3) {
                        return this.ECWrite(
                            (byte)converter.ConvertFromString(args[1]),
                            (byte)converter.ConvertFromString(args[2])
                        );
                    } else {
                        Console.Error.WriteLine("Action `ec-write` requires exactly 2 arguments");
                        return 2;
                    }
                } else if (args.Length > 0 && args[0] == "ec-read") {
                    if (args.Length == 2) {
                        return this.ECRead((byte)converter.ConvertFromString(args[1]));
                    } else {
                        Console.Error.WriteLine("Action `ec-read` requires exactly 1 arguments");
                        return 2;
                    }
                } else if (args.Length > 0 && args[0] == "ec-dump") {
                    if (args.Length == 1) {
                        return this.ECDump();
                    } else {
                        Console.Error.WriteLine("Action `ec-dump` requires no arguments");
                        return 2;
                    }
                } else {
                    int returnValue = 0;
                    TextWriter console = Console.Out;
                    if (args.Length > 0 && (args[0] != "--help" || args[0] != "-h")) {
                        console = Console.Error;

                        console.WriteLine("Unknown action `{0}`!", args[0]);
                        console.WriteLine();

                        returnValue = 2;
                    }

                    console.WriteLine("Usage: nbfc-probe [-h|--help] [ec-dump|ec-read|ec-write] {arguments}");
                    console.WriteLine();
                    console.WriteLine("Possible modes:");
                    console.WriteLine(" * ec-dump");
                    console.WriteLine("    Dump all registers that are present in EC memory as hexadecimal table.");
                    console.WriteLine(" * ec-read [register]");
                    console.WriteLine("    Print the value of the given EC register number.");
                    console.WriteLine(" * ec-write [register] [value]");
                    console.WriteLine("    Write the given value to the given EC RAM register number,");
                    console.WriteLine("    then read the given value from the EC and print the new value.");
                    console.WriteLine();
                    console.WriteLine("All numbers are in decimal format by default; hexadecimal values may be");
                    console.WriteLine("entered by prefixing them with \"0x\".");

                    return returnValue;
                }
            } finally {
                Debug.Listeners.Remove(traceListener);
            }
        }