No cache version.

Caching disabled. Default setting for this page:enabled (code LNG204)
If the display is too slow, you can disable the user mode to view the cached version.

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

  1. using System;
  2. using System.Collections.Generic;
  3. using System.Text;
  4.  
  5. namespace be.gaudry.bibliobrol.model
  6. {
  7. /// <summary>
  8. /// Physical occurence of a Brol.
  9. /// I.E. For a film (Brol object), we may have some physical occurences (MediaBrol object)
  10. /// like a DVD, two different encoding DivX versions on CD, etc.
  11. /// </summary>
  12. [Serializable]
  13. public class MediaBrol : IBrol
  14. {
  15. #region constructors and declarations
  16. private int id;
  17. private Brol brol;
  18. private Media media;
  19. /// <summary>
  20. /// I.E. Sound(DTS), Codec(VOB), etc.
  21. /// </summary>
  22. private List<Quality> qualities;
  23. private Person owner;
  24. private String name, comment, localisation;
  25. private DateTime insertionDate;
  26. [NonSerialized]
  27. private bool borrowed;//used to get quick info with lazy fetching
  28. [NonSerialized]
  29. private List<Borrow> borrows;
  30.  
  31. public MediaBrol()
  32. {
  33. this.reset();
  34. }
  35.  
  36. public MediaBrol(int id, Brol brol):this()
  37. {
  38. this.id = id;
  39. this.brol = brol;
  40. }
  41.  
  42. public MediaBrol(int id, Brol brol, String name)
  43. : this(id, brol)
  44. {
  45. this.name = name;
  46. }
  47.  
  48. public MediaBrol(int id, Brol brol, String name, String comment, String localisation)
  49. : this(id, brol, name)
  50. {
  51. this.comment = comment;
  52. this.localisation = localisation;
  53. }
  54.  
  55. public MediaBrol(
  56. int id, Brol brol, String name, String comment, String localisation,
  57. Media media, List<Quality> qualities,
  58. Person owner, DateTime insertionDate)
  59. : this(id, brol, name, comment, localisation)
  60. {
  61. this.media = media;
  62. this.qualities = qualities;
  63. this.owner = owner;
  64. this.insertionDate = insertionDate;
  65. }
  66.  
  67. public MediaBrol(
  68. int id, Brol brol, String name, String comment, String localisation,
  69. Media media, List<Quality> qualities,
  70. Person owner, DateTime insertionDate, List<Borrow> borrows)
  71. : this(id, brol, name, comment, localisation, media, qualities, owner, insertionDate)
  72. {
  73. this.borrows = borrows;
  74. }
  75. #endregion
  76.  
  77. #region private methods
  78. private void reset()
  79. {
  80. id = -1;
  81. brol = new Brol();
  82. media = new Media(1,"Non défini");
  83. qualities = new List<Quality>();
  84. owner= new Person();
  85. name = "";
  86. comment = "";
  87. localisation = "";
  88. insertionDate = new DateTime(0L);
  89. borrows = new List<Borrow>();
  90. borrowed = false;
  91. }
  92. #endregion
  93.  
  94. #region getters and setters
  95. public int Id
  96. {
  97. get { return this.id; }
  98. set { this.id = value; }
  99. }
  100. public Brol Brol
  101. {
  102. get { return this.brol; }
  103. set { this.brol = value; }
  104. }
  105. public String Name
  106. {
  107. get { return this.name; }
  108. set { this.name = value; }
  109. }
  110. public String Comment
  111. {
  112. get { return this.comment; }
  113. set { this.comment = value; }
  114. }
  115. public String Localisation
  116. {
  117. get { return this.localisation; }
  118. set { this.localisation = value; }
  119. }
  120. public Person Owner
  121. {
  122. get { return this.owner; }
  123. set { this.owner = value; }
  124. }
  125. public List<Quality> Qualities
  126. {
  127. get { return this.qualities; }
  128. set { this.qualities = value; }
  129. }
  130. public Media MediaType
  131. {
  132. get { return this.media; }
  133. set { this.media = value; }
  134. }
  135.  
  136. public DateTime InsertionDate
  137. {
  138. get { return this.insertionDate; }
  139. set { this.insertionDate = value; }
  140. }
  141. /// <summary>
  142. /// Get or set the history of borrows for this item
  143. /// Be carefull : This info is NOT available in lazy fetching (empty list)
  144. /// </summary>
  145. public List<Borrow> Borrows
  146. {
  147. get { return this.borrows; }
  148. set { this.borrows = value; }
  149. }
  150.  
  151. /// <summary>
  152. /// Get true if this mediabrol is currently borrowed
  153. /// This info is also available in lazy fetching
  154. /// </summary>
  155. public bool Borrowed
  156. {
  157. get
  158. {
  159. /*if (Borrows.Count < 1)
  160.   return false;
  161.   return Borrows[Borrows.Count - 1].EndDate != new DateTime(0L);
  162.   */
  163. return borrowed;
  164. }
  165. set { borrowed = value; }
  166. }
  167. #endregion
  168. }
  169. }

Structure et Fichiers du projet

Afficher/masquer...


Répertoires contenus dans /var/www/bin/sniplets/bibliobrol/src/model/ 
IcôneNomTailleModification
IcôneNomTailleModification
| _ Répertoire parent0 octets1716601975 25/05/2024 03:52:55
| _identity0 octets1541007175 31/10/2018 18:32:55
| _eid0 octets1541007175 31/10/2018 18:32:55
| _LightObjects0 octets1541007175 31/10/2018 18:32:55
| _comparators0 octets1541007174 31/10/2018 18:32:54
| _aws0 octets1541007173 31/10/2018 18:32:53
| _enums0 octets1541007175 31/10/2018 18:32:55
| _dao0 octets1541007174 31/10/2018 18:32:54
Fichiers contenus dans /var/www/bin/sniplets/bibliobrol/src/model/ 
IcôneNomTailleModificationAction
IcôneNomTailleModificationAction
Afficher le fichier .cs|.csPhone.cs4.32 Ko31/10/2018 18:32:24-refusé-
Afficher le fichier .cs|.csPerson.cs5.49 Ko31/10/2018 18:32:24-refusé-
Afficher le fichier .cs|.csActor.cs3.86 Ko31/10/2018 18:32:23-refusé-
Afficher le fichier .cs|.csBrolType.cs1.05 Ko31/10/2018 18:32:23-refusé-
Afficher le fichier .cs|.csGenericContainer.cs1.41 Ko31/10/2018 18:32:24-refusé-
Afficher le fichier .cs|.csStatus.cs1.24 Ko31/10/2018 18:32:24-refusé-
Afficher le fichier .cs|.csQuality.cs2.2 Ko31/10/2018 18:32:24-refusé-
Afficher le fichier .cs|.csIBrol.cs252 octets31/10/2018 18:32:24-refusé-
Afficher le fichier .cs|.csIIdentityFull.cs1.18 Ko31/10/2018 18:32:24-refusé-
Afficher le fichier .cs|.csBrol.cs10.49 Ko31/10/2018 18:32:23-refusé-
Afficher le fichier .cs|.csUser.cs5.17 Ko31/10/2018 18:32:24-refusé-
Afficher le fichier .cs|.csMedia.cs2.04 Ko31/10/2018 18:32:24-refusé-
Afficher le fichier .cs|.csCounter.cs1.17 Ko31/10/2018 18:32:24-refusé-
Afficher le fichier .cs|.csSerieItem.cs1.42 Ko31/10/2018 18:32:24-refusé-
Afficher le fichier .cs|.csIIdentityLight.cs333 octets31/10/2018 18:32:24-refusé-
Afficher le fichier .cs|.csBorrow.cs2.45 Ko31/10/2018 18:32:23-refusé-
Afficher le fichier .cs|.csTask.cs3.01 Ko31/10/2018 18:32:24-refusé-
Afficher le fichier .cs|.csMediaBrol.cs4.97 Ko31/10/2018 18:32:24-refusé-
Afficher le fichier .cs|.csBrolCategory.cs856 octets31/10/2018 18:32:23-refusé-
Afficher le fichier .cs|.csGenericStateContainer.cs777 octets31/10/2018 18:32:24-refusé-
Afficher le fichier .cs|.csSerie.cs688 octets31/10/2018 18:32:24-refusé-
Afficher le fichier .cs|.csModelAdapter.cs33.51 Ko31/10/2018 18:32:24-refusé-
Afficher le fichier .cs|.csActorRole.cs2.72 Ko31/10/2018 18:32:23-refusé-

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.