PageRenderTime 526ms CodeModel.GetById 363ms app.highlight 13ms RepoModel.GetById 78ms app.codeStats 0ms

/TimeSheetReporting/TimeSheetReporting.Web/Service/TimeSheetService.metadata.cs

#
C# | 118 lines | 58 code | 24 blank | 36 comment | 0 complexity | 149c5e2cb6e62a12a7ac4b7333ec88a6 MD5 | raw file
  1#pragma warning disable 649    // disable compiler warnings about unassigned fields
  2
  3namespace TimeSheetReporting.Web.Model
  4{
  5    using System;
  6    using System.Collections.Generic;
  7    using System.ComponentModel;
  8    using System.ComponentModel.DataAnnotations;
  9    using System.Data.Objects.DataClasses;
 10    using System.Linq;
 11    using System.Web.DomainServices;
 12    using System.Web.Ria;
 13    using System.Web.Ria.Services;
 14
 15
 16    // The MetadataTypeAttribute identifies EffortMetadata as the class
 17    // that carries additional metadata for the Effort class.
 18    [MetadataTypeAttribute(typeof(Effort.EffortMetadata))]
 19    public partial class Effort
 20    {
 21
 22        // This class allows you to attach custom attributes to properties
 23        // of the Effort class.
 24        //
 25        // For example, the following marks the Xyz property as a
 26        // required field and specifies the format for valid values:
 27        //    [Required]
 28        //    [RegularExpression("[A-Z][A-Za-z0-9]*")]
 29        //    [StringLength(32)]
 30        //    public string Xyz;
 31        internal sealed class EffortMetadata
 32        {
 33
 34            // Metadata classes are not meant to be instantiated.
 35            private EffortMetadata()
 36            {
 37            }
 38
 39            public DateTime Date;
 40
 41            public string Description;
 42
 43            public double Hours;
 44
 45            public int Id;
 46
 47            [Include]
 48            public Member Member;
 49
 50            [Include]
 51            public Project Project;
 52        }
 53    }
 54
 55    // The MetadataTypeAttribute identifies MemberMetadata as the class
 56    // that carries additional metadata for the Member class.
 57    [MetadataTypeAttribute(typeof(Member.MemberMetadata))]
 58    public partial class Member
 59    {
 60
 61        // This class allows you to attach custom attributes to properties
 62        // of the Member class.
 63        //
 64        // For example, the following marks the Xyz property as a
 65        // required field and specifies the format for valid values:
 66        //    [Required]
 67        //    [RegularExpression("[A-Z][A-Za-z0-9]*")]
 68        //    [StringLength(32)]
 69        //    public string Xyz;
 70        internal sealed class MemberMetadata
 71        {
 72
 73            // Metadata classes are not meant to be instantiated.
 74            private MemberMetadata()
 75            {
 76            }
 77
 78            public EntityCollection<Effort> Effort;
 79
 80            public int Id;
 81
 82            public string Name;
 83        }
 84    }
 85
 86    // The MetadataTypeAttribute identifies ProjectMetadata as the class
 87    // that carries additional metadata for the Project class.
 88    [MetadataTypeAttribute(typeof(Project.ProjectMetadata))]
 89    public partial class Project
 90    {
 91
 92        // This class allows you to attach custom attributes to properties
 93        // of the Project class.
 94        //
 95        // For example, the following marks the Xyz property as a
 96        // required field and specifies the format for valid values:
 97        //    [Required]
 98        //    [RegularExpression("[A-Z][A-Za-z0-9]*")]
 99        //    [StringLength(32)]
100        //    public string Xyz;
101        internal sealed class ProjectMetadata
102        {
103
104            // Metadata classes are not meant to be instantiated.
105            private ProjectMetadata()
106            {
107            }
108
109            public EntityCollection<Effort> Effort;
110
111            public int Id;
112
113            public string Name;
114        }
115    }
116}
117
118#pragma warning restore 649    // re-enable compiler warnings about unassigned fields