本文整理汇总了C#中IInternalObjectContainer类的典型用法代码示例。如果您正苦于以下问题:C# IInternalObjectContainer类的具体用法?C# IInternalObjectContainer怎么用?C# IInternalObjectContainer使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
IInternalObjectContainer类属于命名空间,在下文中一共展示了IInternalObjectContainer类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。
示例1: EnableTransparentPersistenceSupportFor
public virtual void EnableTransparentPersistenceSupportFor(IInternalObjectContainer
container, IRollbackStrategy rollbackStrategy)
{
FlushOnQueryStarted(container);
_rollbackStrategy = rollbackStrategy;
_transparentPersistenceIsEnabled = true;
}
开发者ID:erdincay,项目名称:db4o,代码行数:7,代码来源:TransparentActivationDepthProviderImpl.cs
示例2: Apply
public void Apply(IInternalObjectContainer container)
{
#if NET_3_5
My<LinqQueryMonitor>.Instance.Initialize();
#endif
IEventRegistry eventRegistry = EventRegistryFactory.ForObjectContainer(container);
PerformanceCounter unoptimizedNativeQueriesPerSec = Db4oPerformanceCounters.CounterFor(PerformanceCounterSpec.UnoptimizedNativeQueriesPerSec, false);
PerformanceCounter nativeQueriesPerSec = Db4oPerformanceCounters.CounterFor(PerformanceCounterSpec.NativeQueriesPerSec, false);
container.GetNativeQueryHandler().QueryExecution += delegate(object sender, QueryExecutionEventArgs args)
{
if (args.ExecutionKind == QueryExecutionKind.Unoptimized)
unoptimizedNativeQueriesPerSec.Increment();
nativeQueriesPerSec.Increment();
};
eventRegistry.Closing += delegate
{
nativeQueriesPerSec.RemoveInstance();
nativeQueriesPerSec.Dispose();
unoptimizedNativeQueriesPerSec.Dispose();
#if NET_3_5
container.WithEnvironment(delegate
{
My<LinqQueryMonitor>.Instance.Dispose();
});
#endif
};
}
开发者ID:erdincay,项目名称:db4o,代码行数:33,代码来源:QueryMonitoringSupport.cs
示例3: Apply
// Nothing to do...
/// <summary>internal method, public for implementation reasons.</summary>
/// <remarks>internal method, public for implementation reasons.</remarks>
public virtual void Apply(IInternalObjectContainer objectContainer)
{
if (objectContainer.IsClient)
{
throw new InvalidOperationException(GetType().FullName + " should be configured on the server."
);
}
EventRegistryFactory.ForObjectContainer(objectContainer).Committing += new System.EventHandler<Db4objects.Db4o.Events.CommitEventArgs>
(new _IEventListener4_46(this, objectContainer).OnEvent);
}
开发者ID:bvangrinsven,项目名称:db4o-net,代码行数:13,代码来源:UniqueFieldValueConstraint.cs
示例4: Apply
public void Apply(IInternalObjectContainer container)
{
PerformanceCounter storedObjectsPerSec =
Db4oPerformanceCounters.CounterFor(PerformanceCounterSpec.ObjectsStoredPerSec, false);
PerformanceCounter activatedObjectsPerSec =
Db4oPerformanceCounters.CounterFor(PerformanceCounterSpec.ObjectsActivatedPerSec, false);
PerformanceCounter deactivatedObjectsPerSec =
Db4oPerformanceCounters.CounterFor(PerformanceCounterSpec.ObjectsDeactivatedPerSec, false);
IEventRegistry eventRegistry = EventRegistryFactory.ForObjectContainer(container);
EventHandler<ObjectInfoEventArgs> eventHandler = delegate
{
storedObjectsPerSec.Increment();
};
eventRegistry.Created += eventHandler;
eventRegistry.Updated += eventHandler;
eventRegistry.Activated += delegate
{
activatedObjectsPerSec.Increment();
};
eventRegistry.Deactivated += delegate
{
deactivatedObjectsPerSec.Increment();
};
eventRegistry.Closing += delegate
{
storedObjectsPerSec.Dispose();
activatedObjectsPerSec.Dispose();
deactivatedObjectsPerSec.Dispose();
storedObjectsPerSec.RemoveInstance();
};
if (container.IsClient)
{
return;
}
PerformanceCounter deletedObjectsPerSec =
Db4oPerformanceCounters.CounterFor(PerformanceCounterSpec.ObjectsDeletedPerSec, false);
eventRegistry.Deleted += delegate
{
deletedObjectsPerSec.Increment();
};
eventRegistry.Closing += delegate
{
deletedObjectsPerSec.Dispose();
};
}
开发者ID:Orvid,项目名称:SQLInterfaceCollection,代码行数:54,代码来源:ObjectLifecycleMonitoringSupport.cs
示例5: Apply
// Nothing to do...
/// <summary>
/// Configures the just opened ObjectContainer by setting event listeners,
/// which will be triggered when activation or de-activation is required.
/// </summary>
/// <remarks>
/// Configures the just opened ObjectContainer by setting event listeners,
/// which will be triggered when activation or de-activation is required.
/// </remarks>
/// <param name="container">the ObjectContainer to configure</param>
/// <seealso cref="TransparentPersistenceSupport.Apply(Db4objects.Db4o.Internal.IInternalObjectContainer)
/// ">
/// TransparentPersistenceSupport.Apply(Db4objects.Db4o.Internal.IInternalObjectContainer)
/// </seealso>
public virtual void Apply(IInternalObjectContainer container)
{
if (IsTransparentActivationEnabledOn(container))
{
return;
}
var provider = new TransparentActivationDepthProviderImpl
();
SetActivationDepthProvider(container, provider);
var registry = EventRegistryFor(container);
registry.Instantiated += new _IEventListener4_45(this).OnEvent;
registry.Created += new _IEventListener4_50(this).OnEvent;
registry.Closing += new _IEventListener4_56(this).OnEvent;
var processor = new TADiagnosticProcessor
(this, container);
registry.ClassRegistered += new _IEventListener4_67(processor).OnEvent;
}
开发者ID:masroore,项目名称:db4o,代码行数:31,代码来源:TransparentActivationSupport.cs
示例6: Apply
public void Apply(IInternalObjectContainer container)
{
if (!(container is LocalObjectContainer) || container.ConfigImpl.IsReadOnly())
{
return;
}
var localObjectContainer = (LocalObjectContainer) container;
var freespaceManager = localObjectContainer.FreespaceManager();
var freespaceListener = new FreespaceListener(localObjectContainer);
freespaceManager.Traverse(new FreespaceInitializingVisitor(freespaceListener));
var eventRegistry = EventRegistryFactory.ForObjectContainer(container);
eventRegistry.Closing += delegate
{
freespaceListener.Dispose();
freespaceManager.Listener(NullFreespaceListener.Instance);
};
freespaceManager.Listener(freespaceListener);
}
开发者ID:masroore,项目名称:db4o,代码行数:20,代码来源:FreespaceMonitoringSupport.cs
示例7: Apply
// Nothing to do...
/// <summary>
/// Configures the just opened ObjectContainer by setting event listeners,
/// which will be triggered when activation or de-activation is required.
/// </summary>
/// <remarks>
/// Configures the just opened ObjectContainer by setting event listeners,
/// which will be triggered when activation or de-activation is required.
/// </remarks>
/// <param name="container">the ObjectContainer to configure</param>
/// <seealso cref="TransparentPersistenceSupport.Apply(Db4objects.Db4o.Internal.IInternalObjectContainer)
/// ">TransparentPersistenceSupport.Apply(Db4objects.Db4o.Internal.IInternalObjectContainer)
/// </seealso>
public virtual void Apply(IInternalObjectContainer container)
{
if (IsTransparentActivationEnabledOn(container))
{
return;
}
TransparentActivationDepthProviderImpl provider = new TransparentActivationDepthProviderImpl
();
SetActivationDepthProvider(container, provider);
IEventRegistry registry = EventRegistryFor(container);
registry.Instantiated += new System.EventHandler<Db4objects.Db4o.Events.ObjectInfoEventArgs>
(new _IEventListener4_45(this).OnEvent);
registry.Created += new System.EventHandler<Db4objects.Db4o.Events.ObjectInfoEventArgs>
(new _IEventListener4_50(this).OnEvent);
registry.Closing += new System.EventHandler<Db4objects.Db4o.Events.ObjectContainerEventArgs>
(new _IEventListener4_56(this).OnEvent);
TransparentActivationSupport.TADiagnosticProcessor processor = new TransparentActivationSupport.TADiagnosticProcessor
(this, container);
registry.ClassRegistered += new System.EventHandler<Db4objects.Db4o.Events.ClassEventArgs>
(new _IEventListener4_67(processor).OnEvent);
}
开发者ID:Orvid,项目名称:SQLInterfaceCollection,代码行数:34,代码来源:TransparentActivationSupport.cs
示例8: SetActivationDepthProvider
private void SetActivationDepthProvider(IInternalObjectContainer container, IActivationDepthProvider
provider)
{
container.ConfigImpl.ActivationDepthProvider(provider);
}
开发者ID:Orvid,项目名称:SQLInterfaceCollection,代码行数:5,代码来源:TransparentActivationSupport.cs
示例9: Db4oSignatureMap
internal Db4oSignatureMap(IInternalObjectContainer stream)
{
_stream = stream;
_identities = new Hashtable4();
}
开发者ID:erdincay,项目名称:db4o,代码行数:5,代码来源:Db4oSignatureMap.cs
示例10: Apply
public void Apply(IInternalObjectContainer container)
{
Assert.IsNotNull(container);
_container = container;
}
开发者ID:masroore,项目名称:db4o,代码行数:5,代码来源:ConfigurationItemTestCase.cs
示例11: Apply
public void Apply(IInternalObjectContainer container)
{
}
开发者ID:erdincay,项目名称:db4o,代码行数:4,代码来源:NetworkingMonitoringSupport.cs
示例12: WriteToBuffer
public static ByteArrayBuffer WriteToBuffer(IInternalObjectContainer container, string
str)
{
var buffer = new ByteArrayBuffer(StringIo(container).Length(str));
InternalWrite(container, buffer, str);
return buffer;
}
开发者ID:masroore,项目名称:db4o,代码行数:7,代码来源:StringHandler.cs
示例13: ApplyConfigurationItems
public void ApplyConfigurationItems(IInternalObjectContainer container)
{
Hashtable4 items = ConfigurationItems();
if (items == null)
{
return;
}
IEnumerator i = items.Iterator();
while (i.MoveNext())
{
IEntry4 entry = (IEntry4)i.Current;
IConfigurationItem item = (IConfigurationItem)entry.Value();
item.Apply(container);
}
}
开发者ID:Orvid,项目名称:SQLInterfaceCollection,代码行数:15,代码来源:Config4Impl.cs
示例14: ActivationProvider
protected static IActivationDepthProvider ActivationProvider(IInternalObjectContainer
container)
{
return container.ConfigImpl.ActivationDepthProvider();
}
开发者ID:Orvid,项目名称:SQLInterfaceCollection,代码行数:5,代码来源:TransparentActivationSupport.cs
示例15: Apply
public void Apply(IInternalObjectContainer container)
{
Assert.AreEqual(ObjectContainerCustomNameTestCase.CustomName, container.ToString(
));
}
开发者ID:Galigator,项目名称:db4o,代码行数:5,代码来源:ObjectContainerCustomNameTestCase.cs
示例16: Apply
public virtual void Apply(IInternalObjectContainer db)
{
EventRegistry(db).Updating += new System.EventHandler<Db4objects.Db4o.Events.CancellableObjectEventArgs>
(new _IEventListener4_19().OnEvent);
}
开发者ID:Galigator,项目名称:db4o,代码行数:5,代码来源:PagedListSupport.cs
示例17: InCallback
public static bool InCallback(IInternalObjectContainer container)
{
if (container.Callbacks() is EventRegistryImpl)
{
EventRegistryImpl er = (EventRegistryImpl)container.Callbacks();
return er._inCallback;
}
return false;
}
开发者ID:superyfwy,项目名称:db4o,代码行数:9,代码来源:EventRegistryImpl.cs
示例18: DetectElementTypeHandler
private ITypeHandler4 DetectElementTypeHandler(IInternalObjectContainer container
, ICollection collection)
{
return (ITypeHandler4)container.Handlers.OpenTypeHandler();
}
开发者ID:erdincay,项目名称:db4o,代码行数:5,代码来源:CollectionTypeHandler.cs
示例19: FlushOnQueryStarted
private void FlushOnQueryStarted(IInternalObjectContainer container)
{
IEventRegistry registry = EventRegistryFactory.ForObjectContainer(container);
registry.QueryStarted += new System.EventHandler<Db4objects.Db4o.Events.QueryEventArgs>
(new _IEventListener4_46(this).OnEvent);
}
开发者ID:erdincay,项目名称:db4o,代码行数:6,代码来源:TransparentActivationDepthProviderImpl.cs
示例20: UnbindAll
private void UnbindAll(IInternalObjectContainer container)
{
Db4objects.Db4o.Internal.Transaction transaction = container.Transaction;
// FIXME should that ever happen?
if (transaction == null)
{
return;
}
IReferenceSystem referenceSystem = transaction.ReferenceSystem();
referenceSystem.TraverseReferences(new _IVisitor4_95(this));
}
开发者ID:Orvid,项目名称:SQLInterfaceCollection,代码行数:11,代码来源:TransparentActivationSupport.cs
注:本文中的IInternalObjectContainer类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论