Beispiel #1
0
        /**
         * The type of context provided by the getContext method.
         *
         * @return Type of platform context.
         * @since v2.0
         */
        public IOSType GetContextType()
        {
            // Start logging elapsed time.
            long     tIn    = TimerUtil.CurrentTimeMillis();
            ILogging logger = AppRegistryBridge.GetInstance().GetLoggingBridge();

            if (logger != null)
            {
                logger.Log(ILoggingLogLevel.Debug, this.apiGroup.ToString(), "AppContextBridge executing getContextType...");
            }

            IOSType result = IOSType.Unknown;

            if (this._delegate != null)
            {
                result = this._delegate.GetContextType();
                if (logger != null)
                {
                    logger.Log(ILoggingLogLevel.Debug, this.apiGroup.ToString(), "AppContextBridge executed 'getContextType' in " + (TimerUtil.CurrentTimeMillis() - tIn) + "ms.");
                }
            }
            else
            {
                if (logger != null)
                {
                    logger.Log(ILoggingLogLevel.Error, this.apiGroup.ToString(), "AppContextBridge no delegate for 'getContextType'.");
                }
            }
            return(result);
        }
 /**
  * Constructor used by implementation to set the OS information.
  *
  * @param Name    of the OS.
  * @param Version of the OS.
  * @param Vendor  of the OS.
  * @since V2.0
  */
 public OSInfo(IOSType name, string version, string vendor) : base()
 {
     this.Name    = Name;
     this.Version = Version;
     this.Vendor  = Vendor;
 }
 /**
  * Sets The name of the operating system.
  *
  * @param name The name of the operating system.
  */
 public void SetName(IOSType Name)
 {
     this.Name = Name;
 }