コード例 #1
0
 private void Generate_AddsAndPassesAttributeToChildren(string attributeName, Action generateDelegate)
 {
     Generator = new AttributeCodeGenerator(attributeName, Configuration, spy1, spy2);
     generateDelegate();
     var attribute = FindAttribute(attributeName);
     Assert.AreSame(attribute, spy1.CodeObjects[0]);
     Assert.AreSame(attribute, spy2.CodeObjects[0]);
 }
コード例 #2
0
 private void SetupProperty()
 {
     ContentType = new MediaType();
     Generator = new AttributeCodeGenerator("GenericProperty", Configuration);
     Candidate = new CodeMemberProperty();
 }
コード例 #3
0
 private void SetupMediaType()
 {
     ContentType = new MediaType();
     Generator = new AttributeCodeGenerator("MediaType", Configuration);
     Candidate = new CodeTypeDeclaration();
 }