예제 #1
0
파일: Media.cs 프로젝트: FlukeFan/Atlanta
 internal static Media InstantiateMedia( Library     owningLibrary,
     MediaType   type,
     string      name,
     string      description)
 {
     Media media = InstantiateOrphanedMedia(type, name, description);
     media.Library = owningLibrary;
     return media;
 }
예제 #2
0
파일: Member.cs 프로젝트: FlukeFan/Atlanta
 protected Member(   Library         owningLibrary,
     string          name,
     DateTime        dateOfBirth,
     MemberStatus    status)
 {
     OwningLibrary = owningLibrary;
     Name = name;
     DateOfBirth = dateOfBirth;
     Status = status;
 }
예제 #3
0
        private static void LoadSingleSystemLibrary()
        {
            IList<Library> libraryList =
                Repository
                    .CreateQuery<Library>()
                    .List<Library>();

            // there should be one, and only one library in the system ...
            if (libraryList.Count < 1)
            {
                throw new Exception("no library found in database");
            }

            if (libraryList.Count > 1)
            {
                throw new Exception("more than 1 library found in database");
            }

            _library = libraryList[0];
        }
예제 #4
0
파일: Library.cs 프로젝트: FlukeFan/Atlanta
 public static Library InstantiateLibrary()
 {
     Library library = new Library();
     DomainRegistry.Repository.Add(library);
     return library;
 }
예제 #5
0
파일: Member.cs 프로젝트: FlukeFan/Atlanta
 public static Member InstantiateMember(Library owningLibrary, string  name, DateTime dateOfBirth, MemberStatus status)
 {
     return new Member(owningLibrary, name, dateOfBirth, status);
 }