Persistate

The 'The' class

Hide Navigation Pane

The 'The' class

Previous topic Next topic No directory for this topic  

The 'The' class

Previous topic Next topic Topic directory requires JavaScript JavaScript is required for the print function Mail us feedback on this topic!  

using System;
using Persistate;
 
// This class is generated automatically.  Do not modify this file.
 
namespace Library.Model
{
   /// <summary>
   /// This class is used to retrieve root entry point objects.
   /// </summary>
   /// <remarks>
   /// One property is generated here for each singleton class. 
   /// For example, assuming a class definition of
   ///   The library is a stable persistent containing ...
   /// then the property here will allow access to it thus
   ///   The.library. ...
   /// </remarks>
   public class The
   {
      private The() {}   // No instantiation.
 
      /// <summary>
      /// Returns the local Domain object.
      /// </summary>
      public static Domain Domain
      {
         get { return Internet.InternetSingleton.LocalDomain; }
      }
 
      /// <summary>
      /// Returns the current Environment object in the active session.
      /// </summary>
      public static Persistate.Environment Environment
      {
         get { return Session.ActiveSession.CurrentEnvironment; }
      }
 
      /// <summary>
      /// Returns the singleton Internet object
      /// </summary>
      public static Internet Internet
      {
         get { return Internet.InternetSingleton; }
      }
 
      private static Library library;
      /// <summary>
      /// Gets or sets the Library singleton persistent tree root
      /// object in the current environment.  Can be set only to null, 
      /// in which case it is reacquired from the current environment on
      /// the next get.
      /// </summary>
      public static Library Library
      {
         get
         {
            if (library == null)
               library = (Library)Session.ActiveSession.FindSingleton(Library.ItsObjectClass);
            return library ;
         }
         set
         {
            if (value != null)
               throw new ArgumentException("Value must be null");
            library = null;
         }
      }
 
   }
}