Ejemplo n.º 1
0
        private void CheckPublicAnnotation <T>(IPublicAnnotation annotation, string name, string target, params Tuple <string, T>[] values)
        {
            Assert.AreEqual(name, annotation.Name);
            Assert.AreEqual(target, annotation.Target);
            Assert.AreEqual(values.Count(), annotation.Keys.Count());
            int i = 0;

            foreach (var key in annotation.Keys)
            {
                var value = annotation.GetValue(key);
                Assert.AreEqual(values[i].Item1, key);
                Assert.AreEqual(values[i].Item2, value);
                i++;
            }
        }
Ejemplo n.º 2
0
 private bool DoInstructionInternal(IPublicAnnotation publicAnnotation,
                                    MetadataContextStack contextStack,
                                    IEnumerable <IDom> newList)
 {
     if (publicAnnotation == null)
     {
         return(false);
     }
     if (!NameMatches(publicAnnotation.Name, true))
     {
         return(false);
     }
     foreach (var key in publicAnnotation.Keys)
     {
         var value = publicAnnotation.GetValue(key);
         PushToContext(contextStack, key, value, true);
         //contextStack.Current.AddValue(key, value);
     }
     return(true);
 }
Ejemplo n.º 3
0
 private IEnumerable <SyntaxTrivia> BuildPublicAnnotationSyntaxTrivia(IPublicAnnotation itemAsPublicAnnotation)
 {
     throw new NotImplementedException();
 }
Ejemplo n.º 4
0
 private void CheckPublicAnnotation(IPublicAnnotation annotation, string name, string target)
 {
     CheckPublicAnnotation <object>(annotation, name, target);
 }