MediaBrol.cs
Description du code
MediaBrol.cs est un fichier du projet BiblioBrol.Ce fichier est situé dans /var/www/bin/sniplets/bibliobrol/src/.
Projet BiblioBrol :
Gestion de media en CSharp.
Pour plus d'infos, vous pouvez consulter la brève analyse.
Code source ou contenu du fichier
Code c# (MediaBrol.cs) (169 lignes)
using System; using System.Collections.Generic; using System.Text; namespace be.gaudry.bibliobrol.model { /// <summary> /// Physical occurence of a Brol. /// I.E. For a film (Brol object), we may have some physical occurences (MediaBrol object) /// like a DVD, two different encoding DivX versions on CD, etc. /// </summary> [Serializable] public class MediaBrol : IBrol { #region constructors and declarations private int id; private Brol brol; private Media media; /// <summary> /// I.E. Sound(DTS), Codec(VOB), etc. /// </summary> private List<Quality> qualities; private Person owner; private String name, comment, localisation; private DateTime insertionDate; [NonSerialized] private bool borrowed;//used to get quick info with lazy fetching [NonSerialized] private List<Borrow> borrows; public MediaBrol() { this.reset(); } public MediaBrol(int id, Brol brol):this() { this.id = id; this.brol = brol; } public MediaBrol(int id, Brol brol, String name) : this(id, brol) { this.name = name; } public MediaBrol(int id, Brol brol, String name, String comment, String localisation) : this(id, brol, name) { this.comment = comment; this.localisation = localisation; } public MediaBrol( int id, Brol brol, String name, String comment, String localisation, Media media, List<Quality> qualities, Person owner, DateTime insertionDate) : this(id, brol, name, comment, localisation) { this.media = media; this.qualities = qualities; this.owner = owner; this.insertionDate = insertionDate; } public MediaBrol( int id, Brol brol, String name, String comment, String localisation, Media media, List<Quality> qualities, Person owner, DateTime insertionDate, List<Borrow> borrows) : this(id, brol, name, comment, localisation, media, qualities, owner, insertionDate) { this.borrows = borrows; } #endregion #region private methods private void reset() { id = -1; name = ""; comment = ""; localisation = ""; borrowed = false; } #endregion #region getters and setters public int Id { get { return this.id; } set { this.id = value; } } public Brol Brol { get { return this.brol; } set { this.brol = value; } } public String Name { get { return this.name; } set { this.name = value; } } public String Comment { get { return this.comment; } set { this.comment = value; } } public String Localisation { get { return this.localisation; } set { this.localisation = value; } } public Person Owner { get { return this.owner; } set { this.owner = value; } } public List<Quality> Qualities { get { return this.qualities; } set { this.qualities = value; } } public Media MediaType { get { return this.media; } set { this.media = value; } } public DateTime InsertionDate { get { return this.insertionDate; } set { this.insertionDate = value; } } /// <summary> /// Get or set the history of borrows for this item /// Be carefull : This info is NOT available in lazy fetching (empty list) /// </summary> public List<Borrow> Borrows { get { return this.borrows; } set { this.borrows = value; } } /// <summary> /// Get true if this mediabrol is currently borrowed /// This info is also available in lazy fetching /// </summary> public bool Borrowed { get { /*if (Borrows.Count < 1) return false; return Borrows[Borrows.Count - 1].EndDate != new DateTime(0L); */ return borrowed; } set { borrowed = value; } } #endregion } }
Structure et Fichiers du projet
Afficher/masquer...Icône | Nom | Taille | Modification |
Icône | Nom | Taille | Modification |
| _ | Répertoire parent | 0 octets | 1731727638 16/11/2024 04:27:18 |
| _ | identity | 0 octets | 1541007175 31/10/2018 18:32:55 |
| _ | eid | 0 octets | 1541007175 31/10/2018 18:32:55 |
| _ | LightObjects | 0 octets | 1541007175 31/10/2018 18:32:55 |
| _ | comparators | 0 octets | 1541007174 31/10/2018 18:32:54 |
| _ | aws | 0 octets | 1541007173 31/10/2018 18:32:53 |
| _ | enums | 0 octets | 1541007175 31/10/2018 18:32:55 |
| _ | dao | 0 octets | 1541007174 31/10/2018 18:32:54 |
Utilisation de l'explorateur de code
- Navigation :
- Un clic sur une icône de répertoire ouvre ce répertoire pour en afficher les fichiers.
- Lorsque le répertoire en cours ne contient pas de sous-répertoires il est possible de remonter vers le répertoire parent.
- La structure de répertoires en treetable (tableau en forme d'arborescence) n'est plus possibledans cette version.
- Un clic sur une icône de fichier ouvre ce fichier pour en afficher le code avec la coloration syntaxique adaptée en fonction du langage principal utilisé dans le fichier.
- Affichage :
- Il est possible de trier les répertoires ou les fichiers selon certains critères (nom, taille, date).
- Actions :
- Les actions possible sur les fichiers dépendent de vos droits d'utilisateur sur le site. Veuillez activer le mode utilisateur pour activer les actions.
English translation
You have asked to visit this site in English. For now, only the interface is translated, but not all the content yet.If you want to help me in translations, your contribution is welcome. All you need to do is register on the site, and send me a message asking me to add you to the group of translators, which will give you the opportunity to translate the pages you want. A link at the bottom of each translated page indicates that you are the translator, and has a link to your profile.
Thank you in advance.
Document created the 16/10/2009, last modified the 26/10/2018
Source of the printed document:https://www.gaudry.be/en/cs-bibliobrol-source-rf-model//MediaBrol.cs.html
The infobrol is a personal site whose content is my sole responsibility. The text is available under CreativeCommons license (BY-NC-SA). More info on the terms of use and the author.