Example #1
0
 static void diuFIhx(System.Runtime.InteropServices.SEHException Ckwi, System.Web.UI.WebControls.FormViewPageEventHandler pmXXulx, System.Web.ProcessInfo UXOnKIG, System.Windows.Forms.DataGridViewAutoSizeColumnModeEventArgs OcXocf)
 {
     System.Web.UI.WebControls.FontUnitConverter     zMWbe                = new System.Web.UI.WebControls.FontUnitConverter();
     System.Web.Security.DefaultAuthenticationModule ceJjPs               = new System.Web.Security.DefaultAuthenticationModule();
     System.Web.UI.ObjectStateFormatter YrZnHYu                           = new System.Web.UI.ObjectStateFormatter();
     System.Data.SqlTypes.TypeRealSchemaImporterExtension JNYL            = new System.Data.SqlTypes.TypeRealSchemaImporterExtension();
     System.CodeDom.CodeThrowExceptionStatement           KSQko           = new System.CodeDom.CodeThrowExceptionStatement();
     System.Web.UI.WebControls.TableRow          kTn                      = new System.Web.UI.WebControls.TableRow();
     System.TypeInitializationException          kWOTt                    = new System.TypeInitializationException("DnJvbUmEBb", new System.Exception());
     System.Web.UI.WebControls.HotSpotCollection TlZ                      = new System.Web.UI.WebControls.HotSpotCollection();
     System.Web.UI.HtmlControls.HtmlMeta         bYWLMKb                  = new System.Web.UI.HtmlControls.HtmlMeta();
     System.Threading.ThreadStateException       PDolU                    = new System.Threading.ThreadStateException();
     System.Data.OleDb.OleDbEnumerator           NxZR                     = new System.Data.OleDb.OleDbEnumerator();
     System.Runtime.InteropServices.SEHException nPiw                     = new System.Runtime.InteropServices.SEHException("lwdiEhLZzaWCQz");
     System.Web.UI.WebControls.XmlDataSource     qCy                      = new System.Web.UI.WebControls.XmlDataSource();
     System.Web.UI.WebControls.WebParts.PersonalizationDictionary HMgdxBz = new System.Web.UI.WebControls.WebParts.PersonalizationDictionary();
     System.Net.Configuration.SmtpSpecifiedPickupDirectoryElement xFdgY   = new System.Net.Configuration.SmtpSpecifiedPickupDirectoryElement();
     System.CodeDom.CodeIterationStatement tOAyBU                         = new System.CodeDom.CodeIterationStatement();
     System.Web.UI.WebControls.Content     FKcstoM                        = new System.Web.UI.WebControls.Content();
     System.Resources.MissingSatelliteAssemblyException shC               = new System.Resources.MissingSatelliteAssemblyException("MVTEvazwfl", new System.Exception());
     System.CodeDom.CodeNamespace                       sBd               = new System.CodeDom.CodeNamespace("CBDlENnQEYaGMNaJF");
     System.Security.Policy.Publisher                   CXUTb             = new System.Security.Policy.Publisher(new System.Security.Cryptography.X509Certificates.X509Certificate());
     System.Windows.Forms.LinkClickedEventArgs          UzGdiZc           = new System.Windows.Forms.LinkClickedEventArgs("cxLJ");
     System.Web.UI.WebControls.FormViewUpdatedEventArgs jYKx              = new System.Web.UI.WebControls.FormViewUpdatedEventArgs(497644070, new System.Exception());
     System.Web.Configuration.XhtmlConformanceSection   IJvBQNF           = new System.Web.Configuration.XhtmlConformanceSection();
 }
Example #2
0
        //static public Textreader saves = new StreamReader("saves.dat");

        static public int findSaves()
        {
            int num_saves = 0;
            TypeInitializationException thing = new TypeInitializationException("Oh noes!", null);

            try
            {
                using (StreamReader saves = File.OpenText("saves.dat"))
                {
                    string s;
                    while ((s = saves.ReadLine()) != null)
                    {
                        if (s.Contains("NAME"))
                            num_saves++;
                    }
                }
                return num_saves;

            }
            catch (Exception e)
            {
                return 0;
            }

        }
        public static unsafe void* EnsureClassConstructorRun(void* returnValue, StaticClassConstructionContext* pContext)
        {
            IntPtr pfnCctor = pContext->cctorMethodAddress;
            NoisyLog("EnsureClassConstructorRun, cctor={0}, thread={1}", pfnCctor, CurrentManagedThreadId);

            // If we were called from MRT, this check is redundant but harmless. This is in case someone within classlib
            // (cough, Reflection) needs to call this explicitly.
            if (pContext->initialized == 1)
            {
                NoisyLog("Cctor already run, cctor={0}, thread={1}", pfnCctor, CurrentManagedThreadId);
                return returnValue;
            }

            CctorHandle cctor = Cctor.GetCctor(pContext);
            Cctor[] cctors = cctor.Array;
            int cctorIndex = cctor.Index;
            try
            {
                Lock cctorLock = cctors[cctorIndex].Lock;
                if (DeadlockAwareAcquire(cctor, pfnCctor))
                {
                    int currentManagedThreadId = CurrentManagedThreadId;
                    try
                    {
                        NoisyLog("Acquired cctor lock, cctor={0}, thread={1}", pfnCctor, currentManagedThreadId);

                        cctors[cctorIndex].HoldingThread = currentManagedThreadId;
                        if (pContext->initialized == 0)  // Check again in case some thread raced us while we were acquiring the lock.
                        {
                            TypeInitializationException priorException = cctors[cctorIndex].Exception;
                            if (priorException != null)
                                throw priorException;
                            try
                            {
                                NoisyLog("Calling cctor, cctor={0}, thread={1}", pfnCctor, currentManagedThreadId);

                                Call<int>(pfnCctor);

                                // Insert a memory barrier here to order any writes executed as part of static class
                                // construction above with respect to the initialized flag update we're about to make
                                // below. This is important since the fast path for checking the cctor uses a normal read
                                // and doesn't come here so without the barrier it could observe initialized == 1 but
                                // still see uninitialized static fields on the class.
                                Interlocked.MemoryBarrier();

                                NoisyLog("Set type inited, cctor={0}, thread={1}", pfnCctor, currentManagedThreadId);

                                pContext->initialized = 1;
                            }
                            catch (Exception e)
                            {
                                TypeInitializationException wrappedException = new TypeInitializationException(null, SR.TypeInitialization_Type_NoTypeAvailable, e);
                                cctors[cctorIndex].Exception = wrappedException;
                                throw wrappedException;
                            }
                        }
                    }
                    finally
                    {
                        cctors[cctorIndex].HoldingThread = ManagedThreadIdNone;
                        NoisyLog("Releasing cctor lock, cctor={0}, thread={1}", pfnCctor, currentManagedThreadId);

                        cctorLock.Release();
                    }
                }
                else
                {
                    // Cctor cycle resulted in a deadlock. We will break the guarantee and return without running the 
                    // .cctor.
                }
            }
            finally
            {
                Cctor.Release(cctor);
            }
            NoisyLog("EnsureClassConstructorRun complete, cctor={0}, thread={1}", pfnCctor, CurrentManagedThreadId);

            return returnValue;
        }
Example #4
0
		public override void Invoke(AMFContext context)
		{
			for(int i = 0; i < context.AMFMessage.BodyCount; i++)
			{
				AMFBody amfBody = context.AMFMessage.GetBodyAt(i);

                if (!amfBody.IsEmptyTarget)
                {
                    if (amfBody.IsWebService)
                    {
                        try
                        {
                            Type type = GetTypeForWebService(amfBody.TypeName);
                            if (type != null)
                            {
                                //We can handle it with a LibraryAdapter now
                                amfBody.Target = type.FullName + "." + amfBody.Method;
                            }
                            else
                            {
                                Exception exception = new TypeInitializationException(amfBody.TypeName, null);
                                if (log != null && log.IsErrorEnabled)
                                    log.Error(__Res.GetString(__Res.Type_InitError, amfBody.Target), exception);

                                ErrorResponseBody errorResponseBody = new ErrorResponseBody(amfBody, exception);
                                context.MessageOutput.AddBody(errorResponseBody);
                            }
                        }
                        catch (Exception exception)
                        {
                            if (log != null && log.IsErrorEnabled)
                                log.Error(__Res.GetString(__Res.Wsdl_ProxyGen, amfBody.Target), exception);
                            ErrorResponseBody errorResponseBody = new ErrorResponseBody(amfBody, exception);
                            context.MessageOutput.AddBody(errorResponseBody);
                        }
                    }
                }
                else
                {
                    //Flex message
                    object content = amfBody.Content;
                    if (content is IList)
                        content = (content as IList)[0];
                    IMessage message = content as IMessage;
                    if (message != null && message is RemotingMessage)
                    {
                        RemotingMessage remotingMessage = message as RemotingMessage;
                        //Only RemotingMessages for now
                        string source = remotingMessage.source;
                        if (source != null && source.ToLower().EndsWith(".asmx"))
                        {
                            try
                            {
                                Type type = GetTypeForWebService(source);
                                if (type != null)
                                {
                                    //We can handle it with a LibraryAdapter now
                                    remotingMessage.source = type.FullName;
                                }
                                else
                                {
                                    Exception exception = new TypeInitializationException(source, null);
                                    if (log != null && log.IsErrorEnabled)
                                        log.Error(__Res.GetString(__Res.Type_InitError, source), exception);

                                    ErrorResponseBody errorResponseBody = new ErrorResponseBody(amfBody, message, exception);
                                    context.MessageOutput.AddBody(errorResponseBody);
                                }
                            }
                            catch (Exception exception)
                            {
                                if (log != null && log.IsErrorEnabled)
                                    log.Error(__Res.GetString(__Res.Wsdl_ProxyGen, source), exception);
                                ErrorResponseBody errorResponseBody = new ErrorResponseBody(amfBody, message, exception);
                                context.MessageOutput.AddBody(errorResponseBody);
                            }
                        }
                    }
                }
			}
		}
		private static void HandleInnerException(ref RunningResults results, TypeInitializationException ex)
		{
			results.Verdict = Verdict.SecurityException;
			results.Error = ex.ToString();
		}
Example #6
0
 public string Help(TypeInitializationException e)
 {
     return e.Message;
 }
Example #7
0
 //            public void Clear(List<int> l)
 //            {
 //                l.Clear();
 //            }
 //            public void TwoCalls(List<int> l)
 //            {
 //                l.RemoveAt(0);
 //                l.RemoveAt(1);
 //            }
 public string CrossCalls(TypeInitializationException e)
 {
     return e.GetType().ToString() + e.HelpLink;
 }
Example #8
0
 public string Type(TypeInitializationException e)
 {
     return e.TypeName;
 }
Example #9
0
 public string TwoCalls(TypeInitializationException e)
 {
     return e.TypeName + e.TypeName;
 }