void AnalyzeMessageAttach(BAMLAnalyzer analyzer, Tuple <IDnlibDef, AttributeInfoRecord, TypeDef> attr, string value) { if (attr.Item2 == null) { return; } TypeDef attrDeclType = analyzer.ResolveType(attr.Item2.OwnerTypeId); if (attrDeclType.FullName != "Caliburn.Micro.Message") { return; } foreach (string msg in value.Split(';')) { string msgStr = msg.Contains("=") ? msg.Split('=')[1].Trim('[', ']', ' ') : msg.Trim('[', ']', ' '); if (msgStr.StartsWith("Action")) { msgStr = msgStr.Substring(6); } int parenIndex = msgStr.IndexOf('('); if (parenIndex != -1) { msgStr = msgStr.Substring(0, parenIndex); } string actName = msgStr.Trim(); foreach (MethodDef method in analyzer.LookupMethod(actName)) { analyzer.NameService.SetCanRename(method, false); } } }
// Token: 0x06000015 RID: 21 RVA: 0x00002AEC File Offset: 0x00000CEC private void AnalyzeMessageAttach(BAMLAnalyzer analyzer, Tuple <IDnlibDef, AttributeInfoRecord, TypeDef> attr, string value) { if (attr.Item2 == null) { return; } TypeDef attrDeclType = analyzer.ResolveType(attr.Item2.OwnerTypeId); if (attrDeclType.FullName != "Caliburn.Micro.Message") { return; } string[] array = value.Split(new char[] { ';' }); for (int i = 0; i < array.Length; i++) { string msg = array[i]; string msgStr; if (msg.Contains("=")) { msgStr = msg.Split(new char[] { '=' })[1].Trim(new char[] { '[', ']', ' ' }); } else { msgStr = msg.Trim(new char[] { '[', ']', ' ' }); } if (msgStr.StartsWith("Action")) { msgStr = msgStr.Substring(6); } int parenIndex = msgStr.IndexOf('('); if (parenIndex != -1) { msgStr = msgStr.Substring(0, parenIndex); } string actName = msgStr.Trim(); foreach (MethodDef method in analyzer.LookupMethod(actName)) { analyzer.NameService.SetCanRename(method, false); } } }
// Token: 0x06000016 RID: 22 RVA: 0x00002C4C File Offset: 0x00000E4C private void AnalyzeAutoBind(BAMLAnalyzer analyzer, Tuple <IDnlibDef, AttributeInfoRecord, TypeDef> attr, string value) { if (!(attr.Item1 is PropertyDef) || ((PropertyDef)attr.Item1).DeclaringType.FullName != "System.Windows.FrameworkElement") { return; } foreach (MethodDef method in analyzer.LookupMethod(value)) { analyzer.NameService.SetCanRename(method, false); } foreach (PropertyDef method2 in analyzer.LookupProperty(value)) { analyzer.NameService.SetCanRename(method2, false); } }
// Token: 0x06000017 RID: 23 RVA: 0x00002D14 File Offset: 0x00000F14 private void AnalyzeActionMessage(BAMLAnalyzer analyzer, Tuple <IDnlibDef, AttributeInfoRecord, TypeDef> attr, string value) { if (attr.Item2 == null) { return; } TypeDef attrDeclType = analyzer.ResolveType(attr.Item2.OwnerTypeId); if (attrDeclType.FullName != "Caliburn.Micro.ActionMessage") { return; } foreach (MethodDef method in analyzer.LookupMethod(value)) { analyzer.NameService.SetCanRename(method, false); } }