Exemplo n.º 1
0
 public BlockEntry(AssemblyEntry assembly, ModuleDefinition module, MethodDefinition method, int startingILOffset, int length, int token)
 {
     Assembly         = assembly;
     Module           = module.ToString();
     Namespace        = NamespaceTokenizer.Tokenize(method.DeclaringType.Namespace);
     Type             = method.DeclaringType.Name;
     Method           = method.Name;
     StartingILOffset = startingILOffset;
     Length           = length;
     Token            = token;
 }
        public void ShouldTokenizeNestedClass()
        {
            var result = NamespaceTokenizer.Tokenize("Normal/Nested");

            CollectionAssert.AreEqual(new [] { N("Normal"), I("Nested") }, result);
        }
        public void ShouldTokenizeMixed()
        {
            var result = NamespaceTokenizer.Tokenize("A.B/C");

            CollectionAssert.AreEqual(new [] { N("A"), N("B"), I("C") }, result);
        }
        public void ShouldTokenizeSimpleNamespace()
        {
            var result = NamespaceTokenizer.Tokenize("Outer.Inner");

            CollectionAssert.AreEqual(new [] { N("Outer"), N("Inner") }, result);
        }