コード例 #1
0
 public void SetUp()
 {
     Configuration = CodeGeneratorConfiguration.Create().MediaTypes;
     Generator     = new CommonInfoGenerator(Configuration);
     ContentType   = new MediaType {
         Info = { Alias = "anEntity" }
     };
     Candidate = Type = new CodeTypeDeclaration();
     info      = ContentType.Info;
 }
コード例 #2
0
        public void SetUp()
        {
            Configuration = new CodeGeneratorConfiguration().MediaTypes;
            Candidate     = type = new CodeTypeDeclaration();
            contentType   = new MediaType
            {
                Info = info = new Info {
                    Alias = "anEntity"
                }
            };

            attribute = new CodeAttributeDeclaration("MediaType");
            type.CustomAttributes.Add(attribute);

            Generator = new CommonInfoGenerator(Configuration);
        }