Geen cache-versie.

Caching uitgeschakeld. Standaardinstelling voor deze pagina:ingeschakeld (code LNG204)
Als het scherm te langzaam is, kunt u de gebruikersmodus uitschakelen om de cacheversie te bekijken.

Notification.cs

Description du code

Notification.cs est un fichier du projet BrolDev.
Ce fichier est situé dans /var/www/bin/sniplets/bibliobrol/broldev/src/.

Projet BrolDev : Librairie de composants réutilisables pour les applications BrolDev en CSharp.

Code source ou contenu du fichier

  1. using System;
  2.  
  3. namespace be.gaudry.observer
  4. {
  5. public class Notification
  6. {
  7. #region declarations
  8. /// <summary>
  9. /// Level of notification. May be used to deal only with some notifications.
  10. /// </summary>
  11. public enum VERBOSE
  12. {
  13. /// <summary>
  14. /// sql query or another persistence operation
  15. /// </summary>
  16. persistentOperation,
  17. /// <summary>
  18. /// any operation
  19. /// </summary>
  20. basicOperation,
  21. /// <summary>
  22. /// feedback of an operation
  23. /// </summary>
  24. opsResult,
  25. /// <summary>
  26. /// requests syntax to debug
  27. /// </summary>
  28. advancedOperation,
  29. /// <summary>
  30. /// info to debug
  31. /// </summary>
  32. debug,
  33. /// <summary>
  34. /// any general error
  35. /// </summary>
  36. error,
  37. /// <summary>
  38. /// may not interrupt application
  39. /// </summary>
  40. lowError,
  41. /// <summary>
  42. /// application must be interrupt
  43. /// </summary>
  44. criticalError,
  45. /// <summary>
  46. /// used to notify without display info
  47. /// </summary>
  48. internalNotification,
  49. /// <summary>
  50. /// used to notify a modification without display info
  51. /// </summary>
  52. modified,
  53. /// <summary>
  54. /// used to store errors and not display it
  55. /// </summary>
  56. hideErrors,
  57. /// <summary>
  58. /// used to clean stored errors and adopt normal behaviour
  59. /// </summary>
  60. showNewErrors,
  61. /// <summary>
  62. /// used to display stored errors
  63. /// </summary>
  64. showErrors
  65. }
  66.  
  67. private String title, msg;
  68. private Exception e;
  69. private VERBOSE verbose;
  70. private Object sender;
  71. #endregion
  72.  
  73. #region constructors
  74. public Notification(String msg)
  75. : this(VERBOSE.basicOperation, "Information", msg) { }
  76.  
  77. public Notification(String msg, Object sender)
  78. : this(VERBOSE.basicOperation, "Information", msg, sender) { }
  79.  
  80. public Notification(String title, String msg)
  81. : this(VERBOSE.basicOperation, title, msg) { }
  82.  
  83. public Notification(String title, String msg, Object sender)
  84. : this(VERBOSE.basicOperation, title, msg, sender) { }
  85.  
  86. public Notification(VERBOSE level, String title, String msg, Object sender)
  87. : this(level, title, msg)
  88. {
  89. this.sender = sender;
  90. }
  91.  
  92. public Notification(VERBOSE level, String msg, Object sender)
  93. : this(level, "", msg, sender) { }
  94.  
  95. public Notification(VERBOSE level, String title, String msg)
  96. {
  97. this.verbose = level;
  98. this.title = title;
  99. this.msg = msg;
  100. }
  101.  
  102. public Notification(VERBOSE level, String title, String msg, Exception e)
  103. : this(level, title, msg)
  104. {
  105. this.e = e;
  106. }
  107.  
  108. public Notification(VERBOSE level, String title, String msg, Exception e, Object sender)
  109. : this(level, title, msg, e)
  110. {
  111. this.sender = sender;
  112. }
  113.  
  114. public Notification(VERBOSE level, Exception e)
  115. : this(level, "Erreur", "", e) { }
  116.  
  117. public Notification(VERBOSE level, Exception e, Object sender)
  118. : this(level, "Erreur", "", e, sender) { }
  119.  
  120. public Notification(VERBOSE level, String title, Exception e)
  121. : this(level, title, "", e) { }
  122.  
  123. public Notification(VERBOSE level, String title, Exception e, Object sender)
  124. : this(level, title, "", e, sender) { }
  125.  
  126. public Notification(Exception e)
  127. : this(VERBOSE.error, "Erreur", "", e) { }
  128.  
  129. public Notification(Exception e, Object sender)
  130. : this(VERBOSE.error, "Erreur", "", e, sender) { }
  131. #endregion
  132.  
  133. #region getters and setters
  134. public String Title
  135. {
  136. set { this.title = value; }
  137. get { return this.title; }
  138. }
  139. public String Msg
  140. {
  141. set { this.msg = value; }
  142. get { return this.msg; }
  143. }
  144. public Exception NotificationException
  145. {
  146. set { this.e = value; }
  147. get { return this.e; }
  148. }
  149. public VERBOSE Level
  150. {
  151. set { this.verbose = value; }
  152. get { return this.verbose; }
  153. }
  154. public Object Sender
  155. {
  156. set { this.sender = value; }
  157. get { return this.sender; }
  158. }
  159. #endregion
  160. }
  161. }

Structure et Fichiers du projet

Afficher/masquer...


Répertoires contenus dans /var/www/bin/sniplets/bibliobrol/broldev/src/observer/ 
IcôneNomTailleModification
Pas de sous-répertoires.
IcôneNomTailleModification
| _ Répertoire parent0 octets1714409107 29/04/2024 18:45:07
Fichiers contenus dans /var/www/bin/sniplets/bibliobrol/broldev/src/observer/ 
IcôneNomTailleModificationAction
IcôneNomTailleModificationAction
Afficher le fichier .cs|.csIObserver.cs133 octets31/10/2018 18:32:48-refusé-
Afficher le fichier .cs|.csIObservable.cs790 octets31/10/2018 18:32:48-refusé-
Afficher le fichier .cs|.csObservable.cs1.5 Ko31/10/2018 18:32:48-refusé-
Afficher le fichier .cs|.csNotification.cs4.92 Ko31/10/2018 18:32:48-refusé-
Afficher le fichier .cs|.csStaticObservable.cs2.74 Ko31/10/2018 18:32:48-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.

Nederlandse vertaling

U hebt gevraagd om deze site in het Nederlands te bezoeken. Voor nu wordt alleen de interface vertaald, maar nog niet alle inhoud.

Als je me wilt helpen met vertalingen, is je bijdrage welkom. Het enige dat u hoeft te doen, is u op de site registreren en mij een bericht sturen waarin u wordt gevraagd om u toe te voegen aan de groep vertalers, zodat u de gewenste pagina's kunt vertalen. Een link onderaan elke vertaalde pagina geeft aan dat u de vertaler bent en heeft een link naar uw profiel.

Bij voorbaat dank.

Document heeft de 16/10/2009 gemaakt, de laatste keer de 26/10/2018 gewijzigd
Bron van het afgedrukte document:https://www.gaudry.be/nl/cs-broldev-source-rf-observer/Notification.cs.html

De infobrol is een persoonlijke site waarvan de inhoud uitsluitend mijn verantwoordelijkheid is. De tekst is beschikbaar onder CreativeCommons-licentie (BY-NC-SA). Meer info op de gebruiksvoorwaarden en de auteur.