本文整理汇总了C#中IPersistenceProvider类的典型用法代码示例。如果您正苦于以下问题:C# IPersistenceProvider类的具体用法?C# IPersistenceProvider怎么用?C# IPersistenceProvider使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
IPersistenceProvider类属于命名空间,在下文中一共展示了IPersistenceProvider类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: MSAReferenceComboBoxSlice
/// ------------------------------------------------------------------------------------
/// <summary>
/// Constructor.
/// </summary>
/// <param name="cache">FDO cache.</param>
/// <param name="obj">CmObject that is being displayed.</param>
/// <param name="flid">The field identifier for the attribute we are displaying.</param>
/// <param name="persistenceProvider">The persistence provider.</param>
/// ------------------------------------------------------------------------------------
public MSAReferenceComboBoxSlice(FdoCache cache, ICmObject obj, int flid,
IPersistenceProvider persistenceProvider)
: base(new UserControl(), cache, obj, flid)
{
IWritingSystem defAnalWs = m_cache.ServiceLocator.WritingSystems.DefaultAnalysisWritingSystem;
m_persistProvider = persistenceProvider;
m_tree = new TreeCombo();
m_tree.WritingSystemFactory = cache.WritingSystemFactory;
m_tree.Font = new System.Drawing.Font(defAnalWs.DefaultFontName, 10);
if (!Application.RenderWithVisualStyles)
m_tree.HasBorder = false;
m_tree.WritingSystemCode = defAnalWs.Handle;
// We embed the tree combo in a layer of UserControl, so it can have a fixed width
// while the parent window control is, as usual, docked 'fill' to work with the splitter.
m_tree.Dock = DockStyle.Left;
m_tree.Width = 240;
m_tree.DropDown += m_tree_DropDown;
Control.Controls.Add(m_tree);
m_tree.SizeChanged += m_tree_SizeChanged;
if (m_cache != null)
m_cache.DomainDataByFlid.AddNotification(this);
m_treeBaseWidth = m_tree.Width;
// m_tree has sensible PreferredHeight once the text is set, UserControl does not.
//we need to set the Height after m_tree.Text has a value set to it.
Control.Height = m_tree.PreferredHeight;
}
示例2: PhEnvStrRepresentationSlice
/// <summary>
/// We want the persistence provider, and the easiest way to get it is to get all
/// this other stuff we don't need or use.
/// </summary>
/// <param name="cache"></param>
/// <param name="editor"></param>
/// <param name="flid"></param>
/// <param name="node"></param>
/// <param name="obj"></param>
/// <param name="stringTbl"></param>
/// <param name="persistenceProvider"></param>
/// <param name="ws"></param>
public PhEnvStrRepresentationSlice(FdoCache cache, string editor, int flid,
System.Xml.XmlNode node, ICmObject obj, StringTable stringTbl,
IPersistenceProvider persistenceProvider, int ws)
: base(new StringRepSliceView(obj.Hvo), obj, StringRepSliceVc.Flid)
{
m_persistenceProvider = persistenceProvider;
}
示例3: MyClassInitialize
public static void MyClassInitialize(TestContext testContext)
{
AutoFacResolver.InitialiseFoundation();
var instance = DependencyResolver.Current.Resolve<IFoundationConfigurationSection>();
_provider = DependencyResolver.Current.Resolve<IPersistenceProvider>("nhibernate-01");
}
示例4: Initialize
/// <summary>
/// Initialize the launcher.
/// </summary>
/// <param name="cache"></param>
/// <param name="obj"></param>
/// <param name="flid"></param>
/// <param name="fieldName"></param>
public override void Initialize(FdoCache cache, ICmObject obj, int flid, string fieldName,
IPersistenceProvider persistProvider, Mediator mediator, string displayNameProperty, string displayWs)
{
CheckDisposed();
base.Initialize(cache, obj, flid, fieldName, persistProvider, mediator, displayNameProperty, displayWs);
m_msaDlglauncherView.Init(mediator, obj as MoMorphSynAnalysis);
}
示例5: ReversalIndexEntryFormSlice
#pragma warning restore 0414
public ReversalIndexEntryFormSlice(FdoCache cache, string editor, int flid, XmlNode node,
ICmObject obj, StringTable stringTbl, IPersistenceProvider persistenceProvider, int ws)
: base(obj, flid, WritingSystemServices.kwsAllReversalIndex, 0, false, true, true)
{
m_configNode = node;
m_stringTbl = stringTbl;
m_persistProvider = persistenceProvider;
}
示例6: given_initated_payment
protected given_initated_payment(IPersistenceProvider sutProvider)
{
this.sutProvider = sutProvider;
this.sut = new ThirdPartyProcessorPayment(PaymentId, SourceId, "payment", 300, new[] { new ThidPartyProcessorPaymentItem("item1", 100), new ThidPartyProcessorPaymentItem("item2", 200) });
this.sut = this.sutProvider.PersistReload(this.sut);
}
示例7: BasicIPASymbolSlice
/// <summary>
/// Constructor invoked via the editor="customWithParams" slice XML configuration
/// </summary>
/// <param name="cache"></param>
/// <param name="editor"></param>
/// <param name="flid"></param>
/// <param name="node"></param>
/// <param name="obj"></param>
/// <param name="stringTbl"></param>
/// <param name="persistenceProvider"></param>
/// <param name="ws"></param>
public BasicIPASymbolSlice(FdoCache cache, string editor, int flid,
System.Xml.XmlNode node, ICmObject obj, StringTable stringTbl,
IPersistenceProvider persistenceProvider, int ws)
: base(obj, flid, ws)
{
var phoneme = (IPhPhoneme)m_obj;
phoneme.BasicIPASymbolChanged += UpdatePhoneme;
}
示例8: Initialize
/// <summary>
/// Initialize the launcher.
/// </summary>
/// <param name="cache"></param>
/// <param name="obj"></param>
/// <param name="flid"></param>
/// <param name="fieldName"></param>
public override void Initialize(FdoCache cache, ICmObject obj, int flid, string fieldName,
IPersistenceProvider persistProvider, Mediator mediator, string displayNameProperty, string displayWs)
{
CheckDisposed();
base.Initialize(cache, obj, flid, fieldName, persistProvider, mediator, displayNameProperty, displayWs);
m_msaInflectionFeatureListDlgLauncherView.Init(mediator, obj as IFsFeatStruc);
}
示例9: AtomicReferenceSlice
/// -----------------------------------------------------------------------------------
/// <summary>
/// Initializes a new instance of the <see cref="AtomicReferenceSlice"/> class.
/// </summary>
/// -----------------------------------------------------------------------------------
public AtomicReferenceSlice(FdoCache cache, ICmObject obj, int flid,
XmlNode configurationNode, IPersistenceProvider persistenceProvider,
Mediator mediator, StringTable stringTbl)
: base(cache, obj, flid, configurationNode, persistenceProvider, mediator, stringTbl)
{
m_sda = m_cache.MainCacheAccessor;
m_sda.AddNotification(this);
}
示例10: Initialize
public override void Initialize(FdoCache cache, ICmObject obj, int flid,
string fieldName, IPersistenceProvider persistProvider, Mediator mediator, string displayNameProperty, string displayWs)
{
CheckDisposed();
base.Initialize(cache, obj, flid, fieldName, persistProvider, mediator, displayNameProperty, displayWs);
m_atomicRefView.Initialize(obj, flid, cache, displayNameProperty, mediator);
}
示例11: PhoneEnvReferenceSlice
public PhoneEnvReferenceSlice(FdoCache cache, ICmObject obj, int flid,
XmlNode configurationNode, IPersistenceProvider persistenceProvider,
Mediator mediator, StringTable stringTbl)
: base(cache, obj, flid,configurationNode, persistenceProvider, mediator, stringTbl)
{
Debug.Assert(obj is MoAffixAllomorph || obj is MoStemAllomorph);
m_persistenceProvider = persistenceProvider;
}
示例12: MSAReferenceComboBoxSlice
/// <summary>
/// Constructor.
/// </summary>
/// <param name="cache">FDO cache.</param>
/// <param name="obj">CmObject that is being displayed.</param>
/// <param name="flid">The field identifier for the attribute we are displaying.</param>
public MSAReferenceComboBoxSlice(FdoCache cache, ICmObject obj, int flid,
IPersistenceProvider persistenceProvider, Mediator mediator)
: base(new UserControl(), cache, obj, flid)
{
m_mediator = mediator;
m_persistProvider = persistenceProvider;
m_tree = new TreeCombo();
m_tree.WritingSystemFactory = cache.LanguageWritingSystemFactoryAccessor;
m_tree.Font = new System.Drawing.Font(cache.LangProject.DefaultAnalysisWritingSystemFont, 10);
if (!Application.RenderWithVisualStyles)
m_tree.HasBorder = false;
//Set the stylesheet and writing system information so that the font size for the
IVwStylesheet stylesheet = FontHeightAdjuster.StyleSheetFromMediator(mediator);
m_tree.WritingSystemCode = cache.LangProject.DefaultAnalysisWritingSystem;
m_tree.StyleSheet = stylesheet;
// We embed the tree combo in a layer of UserControl, so it can have a fixed width
// while the parent window control is, as usual, docked 'fill' to work with the splitter.
m_tree.Dock = DockStyle.Left;
m_tree.Width = 240;
m_tree.DropDown += new EventHandler(m_tree_DropDown);
Control.Controls.Add(m_tree);
m_tree.SizeChanged += new EventHandler(m_tree_SizeChanged);
if (m_MSAPopupTreeManager == null)
{
ICmPossibilityList list = m_cache.LangProject.PartsOfSpeechOA;
int ws = m_cache.LangProject.DefaultAnalysisWritingSystem;
m_tree.WritingSystemCode = ws;
m_MSAPopupTreeManager = new MSAPopupTreeManager(m_tree, m_cache, list, ws, true,
mediator, (Form)mediator.PropertyTable.GetValue("window"));
m_MSAPopupTreeManager.AfterSelect += new TreeViewEventHandler(m_MSAPopupTreeManager_AfterSelect);
m_MSAPopupTreeManager.Sense = m_obj as ILexSense;
m_MSAPopupTreeManager.PersistenceProvider = m_persistProvider;
}
try
{
m_handlingMessage = true;
m_MSAPopupTreeManager.MakeTargetMenuItem();
//m_MSAPopupTreeManager.LoadPopupTree(0);
}
finally
{
m_handlingMessage = false;
}
if (m_cache != null)
{
m_sda = m_cache.MainCacheAccessor;
m_sda.AddNotification(this);
}
m_treeBaseWidth = m_tree.Width;
Control.Height = m_tree.PreferredHeight;
// m_tree has sensible PreferredHeight once the text is set, UserControl does not.
//we need to set the Height after m_tree.Text has a value set to it.
}
示例13: GetProvider
/// <summary>
/// When accessing a db4o embedded database we should use the same instance.
/// </summary>
/// <returns></returns>
public IPersistenceProvider GetProvider()
{
if (this.provider == null)
{
var db = Db4oFactory.OpenFile(this.ConnectionString);
this.provider = new Db4OPersistenceProvider(db, this);
}
return this.provider;
}
示例14: Initialize
public override void Initialize(FdoCache cache, ICmObject obj, int flid,
string fieldName, IPersistenceProvider persistProvider, Mediator mediator, string displayNameProperty, string displayWs)
{
CheckDisposed();
Debug.Assert(obj is MoAffixAllomorph || obj is MoStemAllomorph);
base.Initialize(cache, obj, flid, fieldName, persistProvider, mediator, displayNameProperty, displayWs);
m_phoneEnvRefView.Initialize((MoForm)obj, flid, cache);
}
示例15: PhonologicalFeatureListDlgLauncherSlice
/// <summary>
/// We want the persistence provider, and the easiest way to get it is to get all
/// this other stuff we don't need or use.
/// </summary>
/// <param name="cache"></param>
/// <param name="editor"></param>
/// <param name="flid"></param>
/// <param name="node"></param>
/// <param name="obj"></param>
/// <param name="stringTbl"></param>
/// <param name="persistenceProvider"></param>
/// <param name="ws"></param>
public PhonologicalFeatureListDlgLauncherSlice(FdoCache cache, string editor, int flid,
System.Xml.XmlNode node, ICmObject obj, StringTable stringTbl,
IPersistenceProvider persistenceProvider, int ws)
{
m_obj = obj; // is PhPhoneme
m_persistenceProvider = persistenceProvider;
m_ws = ws;
m_node = node;
m_configurationNode = node;
}