当前位置: 首页>>代码示例>>C#>>正文


C# DatabaseHandle类代码示例

本文整理汇总了C#中DatabaseHandle的典型用法代码示例。如果您正苦于以下问题:C# DatabaseHandle类的具体用法?C# DatabaseHandle怎么用?C# DatabaseHandle使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


DatabaseHandle类属于命名空间,在下文中一共展示了DatabaseHandle类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: EntityGroundVehicle

 public EntityGroundVehicle(INETWISEDriverSink2 WISE, DatabaseHandle databaseHandle, ObjectHandle objectHandle, TransactionHandle transactionHandle)
 {
     this.WISE = WISE;
     this.Database = databaseHandle;
     this.Object = objectHandle;
     this.Transaction = transactionHandle;
 }
开发者ID:GULPF,项目名称:SAAB-CM,代码行数:7,代码来源:Entity.GroundVehicle.cs

示例2: EntityEquipmentSensorCBRNAP2Ce

 public EntityEquipmentSensorCBRNAP2Ce(INETWISEDriverSink2 WISE, DatabaseHandle databaseHandle, ObjectHandle objectHandle, TransactionHandle transactionHandle)
 {
     this.WISE = WISE;
     this.Database = databaseHandle;
     this.Object = objectHandle;
     this.Transaction = transactionHandle;
 }
开发者ID:GULPF,项目名称:SAAB-CM,代码行数:7,代码来源:EntityEquipment.Sensor.CBRN.AP2Ce.cs

示例3: EntityEquipment

 public EntityEquipment(INETWISEDriverSink2 WISE, DatabaseHandle databaseHandle, ObjectHandle objectHandle)
 {
     this.WISE = WISE;
     this.Database = databaseHandle;
     this.Object = objectHandle;
     this.Transaction = TransactionHandle.None;
 }
开发者ID:GULPF,项目名称:SAAB-CM,代码行数:7,代码来源:EntityEquipment.cs

示例4: WISEObject

 public WISEObject(INETWISEDriverSink2 WISE, DatabaseHandle databaseHandle, ObjectHandle objectHandle, TransactionHandle transactionHandle)
 {
     this.WISE = WISE;
     this.Database = databaseHandle;
     this.Object = objectHandle;
     this.Transaction = transactionHandle;
 }
开发者ID:Durlek,项目名称:SAAB-CM,代码行数:7,代码来源:WISEObject.cs

示例5: OnCloseDatabase

        protected override WISE_RESULT OnCloseDatabase(DatabaseHandle hDatabase)
        {
            WISE_RESULT result = WISEError.WISE_OK;

            // Call base class implementation
            result = base.OnCloseDatabase(hDatabase);
            WISEError.CheckCallFailedEx(result);

            //
            // TODO: Close driver communication for the specified database.
            //

            _serviceHost.Close();

            return WISEError.WISE_OK;
        }
开发者ID:GULPF,项目名称:SAAB-CM,代码行数:16,代码来源:CBRNSensorsDriver.cs

示例6: CreateInstance

        public uint CreateInstance(INETWISEDriverSink2 WISE, DatabaseHandle hDatabase, string objectName)
        {
            uint result = WISEError.WISE_ERROR;
            ObjectHandle objectHandle = this.Object;

            if (WISE == null)
            {
                result = WISEError.WISE_E_INVALID_ARG;
                return result;
            }

            if (objectHandle == WISEConstants.WISE_INVALID_HANDLE)
            {
                // Create object from template, if none exist.
                Dictionary<string, AttributeHandle> attributes = new Dictionary<string, AttributeHandle>(); // it's set from Template
                result = WISE.CreateObjectFromTemplate(hDatabase, objectName, EntityGroundVehicle.ClassName, ref objectHandle, ref attributes);
            }

            if (WISEError.CheckCallSucceeded(result))
            {
                this.WISE = WISE;
                this.Database = WISEConstants.WISE_INVALID_HANDLE;
                this.Object = objectHandle;
            }

            return result;
        }
开发者ID:GULPF,项目名称:SAAB-CM,代码行数:27,代码来源:Entity.GroundVehicle.cs

示例7: EntityEquipmentSensorCBRNI28

 public EntityEquipmentSensorCBRNI28(INETWISEDriverSink2 WISE, DatabaseHandle databaseHandle, ObjectHandle objectHandle)
     : base(WISE, databaseHandle, objectHandle)
 {
 }
开发者ID:Durlek,项目名称:SAAB-CM,代码行数:4,代码来源:EntityEquipment.Sensor.CBRN.I28.cs

示例8: CreateInstance

 public WISE_RESULT CreateInstance(INETWISEDriverSink sink, DatabaseHandle hDatabase)
 {
     return CreateInstance(sink, hDatabase, "");
 }
开发者ID:GULPF,项目名称:SAAB-CM,代码行数:4,代码来源:EntityGroundVehicle.cs

示例9: EntityEquipmentSensorCBRNLCD

 public EntityEquipmentSensorCBRNLCD(INETWISEDriverSink2 WISE, DatabaseHandle databaseHandle, ObjectHandle objectHandle, TransactionHandle transactionHandle)
     : base(WISE, databaseHandle, objectHandle, transactionHandle)
 {
 }
开发者ID:Durlek,项目名称:SAAB-CM,代码行数:4,代码来源:EntityEquipment.Sensor.CBRN.LCD.cs

示例10: OnSendEvent

        protected override WISE_RESULT OnSendEvent(DateTime timeStamp, DatabaseHandle hDatabase, EventHandle hEvent,
            ClassHandle hClass, TransactionHandle hTransaction)
        {
            WISE_RESULT result = WISEError.WISE_OK;

            // Call base class implementation
            result = base.OnSendEvent(timeStamp, hDatabase, hEvent, hClass, hTransaction);
            WISEError.CheckCallFailedEx(result);

            try
            {
                //
                // TODO: Send event on driver communication interface.
                //
                // This method typically needs to perform the following steps;
                //   1. Identify the type of event.
                //   2. Based on the event type, extract event attributes.
                //   3. Fill event attribute values into the protocol container associated with the event.
                //   4. Send the event on the underlying protocol.
                //

                #region Sample code: Check event type
                //ClassHandle hTestEventClass = ClassHandle.Invalid;

                //// Get handle corresponding to class "TEST_EVENT" (this can be done once and then cached)
                //result = this.WISETypeInfo.GetWISEClassHandle(hDatabase, "TEST_EVENT", ref hTestEventClass);
                //WISEError.CheckCallFailedEx(result);

                //if (hClass == hTestEventClass)
                //{
                //    #region Sample code: Access TEST_EVENT attributes
                //    string stringAttributeValue = "";
                //    AttributeHandle hAttr = AttributeHandle.Invalid;

                //    result = this.Sink.GetEventAttributeHandle(hDatabase, hEvent, "TEST_STRING", ref hAttr);
                //    WISEError.CheckCallFailedEx(result);

                //    result = this.Sink.GetEventAttributeValue(hDatabase, hEvent, hAttr, ref stringAttributeValue);
                //    WISEError.CheckCallFailedEx(result);
                //    #endregion
                //}
                #endregion
            }
            catch (WISEException ex)
            {
                result = ex.Error.ErrorCode;
            }
            return result;
        }
开发者ID:GULPF,项目名称:SAAB-CM,代码行数:49,代码来源:CBRNSensorsDriver.cs

示例11: OnCreateDatabase

        protected override WISE_RESULT OnCreateDatabase(string strDatabaseName, DatabaseHandle hDatabase,
            DatabaseHandle hTemplateDatabase, DatabaseDistType eDatabaseDistType, DatabaseType eDatabaseType,
            OwnershipMode eModeOwnership, AttributeQualityMode eModeAttributeQuality,
            AttributeTimeMode eModeAttributeTime)
        {
            WISE_RESULT result = WISEError.WISE_OK;

            // Call base class implementation
            result = base.OnCreateDatabase(strDatabaseName, hDatabase, hTemplateDatabase, eDatabaseDistType,
                                eDatabaseType, eModeOwnership, eModeAttributeQuality, eModeAttributeTime);
            WISEError.CheckCallFailedEx(result);

            if (eDatabaseType == DatabaseType.Application)
            {
                //
                // TODO: Open driver communication for the specified database.
                //

                Uri baseAddress = new Uri(string.Format("{0}:{1}", _baseAddress, _port));

                IService service = new Service(this.WISE, hDatabase);
                _serviceHost = new WebServiceHost(service, baseAddress);

                ServiceEndpoint serviceEndpoint = _serviceHost.AddServiceEndpoint(typeof(IService), new WebHttpBinding(), "");

                WebHttpBehavior webHttpBehavior = _serviceHost.Description.Behaviors.Find<WebHttpBehavior>();

                if (webHttpBehavior != null)
                {
                    webHttpBehavior.AutomaticFormatSelectionEnabled = true;
                }
                else
                {
                    WebHttpBehavior webBehavior = new WebHttpBehavior();
                    webBehavior.AutomaticFormatSelectionEnabled = true;
                    serviceEndpoint.Behaviors.Add(webBehavior);
                }

                //
                // Enable metadata
                //

                //ServiceMetadataBehavior metadataBehavior = new ServiceMetadataBehavior();
                //metadataBehavior.MetadataExporter.PolicyVersion = PolicyVersion.Policy15;
                //metadataBehavior.HttpGetEnabled = true;
                //_serviceHost.Description.Behaviors.Add(metadataBehavior);

                //_serviceHost.AddServiceEndpoint(typeof(IMetadataExchange),
                //MetadataExchangeBindings.CreateMexHttpBinding(), "mex");

                //WebHttpBinding webHttpBinding = new WebHttpBinding();
                //webHttpBinding.

                //_serviceHost.AddServiceEndpoint(typeof(IService), webHttpBinding, "");

                // Initialize generated code.
                // TODO: handle error code
                Model.InitializeModel(this.WISE);

                _serviceHost.Open();
            }

            return WISEError.WISE_OK;
        }
开发者ID:GULPF,项目名称:SAAB-CM,代码行数:64,代码来源:CBRNSensorsDriver.cs

示例12: CBRNLCDControl

 public CBRNLCDControl(INETWISEDriverSink2 WISE, DatabaseHandle databaseHandle, EventHandle eventHandle)
 {
     this.WISE = WISE;
     this.Database = databaseHandle;
     this.Handle = eventHandle;
 }
开发者ID:GULPF,项目名称:SAAB-CM,代码行数:6,代码来源:CBRN.LCDControl.cs

示例13: CreateInstance

        public uint CreateInstance(INETWISEDriverSink2 WISE, DatabaseHandle hDatabase)
        {
            uint result = WISEError.WISE_ERROR;
            EventHandle eventHandle = this.Handle;

            if (WISE == null)
            {
                result = WISEError.WISE_E_INVALID_ARG;
                return result;
            }

            if (eventHandle == WISEConstants.WISE_INVALID_HANDLE)
            {
                // Create event from template, if none exist.
                Dictionary<string, AttributeHandle> attributes = new Dictionary<string, AttributeHandle>();
                result = WISE.CreateEventFromTemplate(hDatabase, CBRNLCDControl.ClassName, ref eventHandle, ref attributes);
            }

            if (WISEError.CheckCallSucceeded(result))
            {
                this.WISE = WISE;
                this.Database = WISEConstants.WISE_INVALID_HANDLE;
                this.Handle = eventHandle;
            }

            return result;
        }
开发者ID:GULPF,项目名称:SAAB-CM,代码行数:27,代码来源:CBRN.LCDControl.cs

示例14: EntityEquipmentSensor

 public EntityEquipmentSensor(INETWISEDriverSink sink, DatabaseHandle databaseHandle, ObjectHandle objectHandle)
 {
     this.WISESink = sink;
     this.Database = databaseHandle;
     this.Handle = objectHandle;
 }
开发者ID:GULPF,项目名称:SAAB-CM,代码行数:6,代码来源:EntityEquipmentSensor.cs

示例15: AddToDatabase

		public abstract WISE_RESULT AddToDatabase(DatabaseHandle databaseHandle);
开发者ID:Durlek,项目名称:SAAB-CM,代码行数:1,代码来源:WISEObject.cs


注:本文中的DatabaseHandle类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。