Today I tried to include another book on my list, but the site simply started to generate wrong URLs.
Another bug that bothers me is the fact from time to time the lists don’t render correctly:
Let’s hope these bugs are fixed as soon as possible.
Today I tried to include another book on my list, but the site simply started to generate wrong URLs.
Another bug that bothers me is the fact from time to time the lists don’t render correctly:
Let’s hope these bugs are fixed as soon as possible.
Windows Live is getting better each day.
Their last service is Windows Live Hotspot Locator.
Given an address and a range it locates all the public Wi-Fi hotspots within that range.
It even allows us to search for specific service providers and shows maps such as those from Windows Live Local.
Testing Centers recently started receiving applications for a new beta exam called "Exam 71-540 Microsoft Windows Mobile 5.0 App Development". More information can be found here.
I’m doing this blog post from Windows Live Writer just as a test.
Stay tuned.
PS.: Testing to see if the spell checker works.
// In HttpApplicationFactory
private void HookupEventHandlersForAppplicationAndModules(MethodInfo[] handlers)
{
// handlers receives a list of Global’s methods.
for (int num1 = 0; num1 < handlers.Length; num1++)
{
MethodInfo info1 = handlers[num1];
string text1 = info1.Name;
int num2 = text1.IndexOf('_'); // Splits the method name to get the object and method’s name.
string text2 = text1.Substring(0, num2);
object obj1 = null;
if (string.Compare(text2, "Application", true, CultureInfo.InvariantCulture) == 0)
{
obj1 = this; // Maps “Application_*” to HttpApplication
}
else if (this._moduleCollection != null)
{
obj1 = this._moduleCollection[text2];
}
if (obj1 != null)
{
// Tries to get an EventDescription that matches a method in Global.
Type type1 = obj1.GetType();
EventDescriptorCollection collection1 = TypeDescriptor.GetEvents(type1);
string text3 = text1.Substring(num2 + 1);
EventDescriptor descriptor1 = collection1.Find(text3, true);
if ((descriptor1 == null) && (string.Compare(text3.Substring(0, 2), "on", true, CultureInfo.InvariantCulture) == 0))
{
text3 = text3.Substring(2);
descriptor1 = collection1.Find(text3, true);
}
// Gets a method that corresponds to the “+” in Type.Event += EventHandler
MethodInfo info2 = null;
if (descriptor1 != null)
{
EventInfo info3 = type1.GetEvent(descriptor1.Name);
if (info3 != null)
{
info2 = info3.GetAddMethod();
}
}
if (info2 != null)
{
ParameterInfo[] infoArray1 = info2.GetParameters();
if (infoArray1.Length == 1)
{
Delegate delegate1 = null;
ParameterInfo[] infoArray2 = info1.GetParameters();
if (infoArray2.Length == 0)
{
if (infoArray1[0].ParameterType != typeof(EventHandler))
{
goto Label_0168;
}
ArglessEventHandlerProxy proxy1 = new ArglessEventHandlerProxy(this, info1);
delegate1 = proxy1.Handler;
}
else
{
try
{
// Creates the delegate. Corresponds to “new EventHandler(metodoDeGlobal)”
delegate1 = Delegate.CreateDelegate(infoArray1[0].ParameterType, this, text1);
}
catch (Exception)
{
goto Label_0168;
}
}
try
{
object[] objArray1 = new object[1] { delegate1 } ;
// Binds the method to the event.
// Corresponds to executing the “+” in Type.Event += EventHandler info2.Invoke(obj1, objArray1);
}
catch (Exception)
{
}
}
}
}
Label_0168:;
}
}
// HttpApplication class, from which Global is derived.
private void ReflectOnApplicationType()
{
// Enumerates all Global and it’s wrapper methods..
ArrayList list1 = new ArrayList();
MethodInfo[] infoArray1 = this._theApplicationType.GetMethods(BindingFlags.NonPublic | (BindingFlags.Public | (BindingFlags.Static | BindingFlags.Instance)));
MethodInfo[] infoArray2 = infoArray1;
int num2 = 0;
while (num2 < infoArray2.Length)
{
MethodInfo info1 = infoArray2[num2];
// If the method’s name looks like an event handler, adds it to the list.
if (this.ReflectOnMethodInfoIfItLooksLikeEventHandler(info1))
{
list1.Add(info1);
}
num2++;
}
Type type1 = this._theApplicationType.BaseType;
if ((type1 != null) && (type1 != typeof(HttpApplication)))
{
infoArray1 = type1.GetMethods(BindingFlags.NonPublic | (BindingFlags.Static | BindingFlags.Instance));
infoArray2 = infoArray1;
for (num2 = 0; num2 < infoArray2.Length; num2++)
{
MethodInfo info2 = infoArray2[num2];
if (info2.IsPrivate && this.ReflectOnMethodInfoIfItLooksLikeEventHandler(info2))
{
list1.Add(info2);
}
}
}
// Stores the list of methods for further use.
this._eventHandlerMethods = new MethodInfo[list1.Count];
for (int num1 = 0; num1 < this._eventHandlerMethods.Length; num1++)
{
this._eventHandlerMethods[num1] = (MethodInfo) list1[num1];
}
}
//Também na classe HttpApplicaton
private bool ReflectOnMethodInfoIfItLooksLikeEventHandler(MethodInfo m)
{
ParameterInfo[] infoArray1;
string text1;
if (m.ReturnType == typeof(void))
{
infoArray1 = m.GetParameters();
switch (infoArray1.Length)
{
case 0:
{
goto Label_007A;
}
case 2:
{
// The event handler’s traditional signature in .NET: object, EventArgs
if (infoArray1[0].ParameterType != typeof(object))
{
return false;
}
if ((infoArray1[1].ParameterType != typeof(EventArgs)) && !infoArray1[1].ParameterType.IsSubclassOf(typeof(EventArgs)))
{
return false;
}
goto Label_007A;
}
}
}
// If it doesn’t have 0 or 2 parameters, the method is not an event handler.
return false;
Label_007A:
text1 = m.Name;
int num1 = text1.IndexOf('_');
if ((num1 <= 0) || (num1 > (text1.Length - 1)))
{
// “_” has to be within the name but it cannot be neither the first nor the last character.
return false;
}
// Special cases that won’t be treated in HookupEventHandlersForAppplicationAndModules
if ((string.Compare(text1, "Application_OnStart", true, CultureInfo.InvariantCulture) == 0) || (string.Compare(text1, "Application_Start", true, CultureInfo.InvariantCulture) == 0))
{
this._onStartMethod = m;
this._onStartParamCount = infoArray1.Length;
}
else if ((string.Compare(text1, "Application_OnEnd", true, CultureInfo.InvariantCulture) == 0) || (string.Compare(text1, "Application_End", true, CultureInfo.InvariantCulture) == 0))
{
this._onEndMethod = m;
this._onEndParamCount = infoArray1.Length;
}
else if ((string.Compare(text1, "Session_OnEnd", true, CultureInfo.InvariantCulture) == 0) || (string.Compare(text1, "Session_End", true, CultureInfo.InvariantCulture) == 0))
{
this._sessionOnEndMethod = m;
this._sessionOnEndParamCount = infoArray1.Length;
}
return true;
}