本文整理汇总了C#中IPersistenceProvider类的典型用法代码示例。如果您正苦于以下问题:C# IPersistenceProvider类的具体用法?C# IPersistenceProvider怎么用?C# IPersistenceProvider使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
IPersistenceProvider类属于命名空间,在下文中一共展示了IPersistenceProvider类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的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;
}
开发者ID:bbriggs,项目名称:FieldWorks,代码行数:40,代码来源:MSAReferenceComboBoxSlice.cs
示例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;
}
开发者ID:bbriggs,项目名称:FieldWorks,代码行数:19,代码来源:PhEnvStrRepresentationSlice.cs
示例3: MyClassInitialize
public static void MyClassInitialize(TestContext testContext)
{
AutoFacResolver.InitialiseFoundation();
var instance = DependencyResolver.Current.Resolve<IFoundationConfigurationSection>();
_provider = DependencyResolver.Current.Resolve<IPersistenceProvider>("nhibernate-01");
}
开发者ID:Joebeazelman,项目名称:rebelcmsxu5,代码行数:7,代码来源:NHibernateProviderTest.cs
示例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);
}
开发者ID:sillsdev,项目名称:WorldPad,代码行数:15,代码来源:MSADlgLauncher.cs
示例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;
}
开发者ID:sillsdev,项目名称:FieldWorks,代码行数:10,代码来源:ReversalIndexEntryFormSlice.cs
示例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);
}
开发者ID:wayne-o,项目名称:delete-me,代码行数:8,代码来源:ThirdPartyProcessorPaymentFixture.cs
示例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;
}
开发者ID:sillsdev,项目名称:FieldWorks,代码行数:19,代码来源:BasicIPASymbolSlice.cs
示例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);
}
开发者ID:sillsdev,项目名称:FieldWorks,代码行数:15,代码来源:MsaInflectionFeatureListDlgLauncher.cs
示例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);
}
开发者ID:sillsdev,项目名称:WorldPad,代码行数:13,代码来源:AtomicReferenceSlice.cs
示例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);
}
开发者ID:sillsdev,项目名称:WorldPad,代码行数:8,代码来源:AtomicReferenceLauncher.cs
示例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;
}
开发者ID:sillsdev,项目名称:WorldPad,代码行数:8,代码来源:PhoneEnvReferenceSlice.cs
示例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.
}
开发者ID:sillsdev,项目名称:WorldPad,代码行数:64,代码来源:MSAReferenceComboBoxSlice.cs
示例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;
}
开发者ID:nuxleus,项目名称:ServiceStack.Extras,代码行数:13,代码来源:Db4oFileProviderManager.cs
示例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);
}
开发者ID:sillsdev,项目名称:WorldPad,代码行数:10,代码来源:PhoneEnvReferenceLauncher.cs
示例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;
}
开发者ID:sillsdev,项目名称:WorldPad,代码行数:22,代码来源:PhonologicalFeatureListDlgLauncherSlice.cs
示例16: 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_PhonologicalFeatureListDlgLauncherView.Init(mediator, obj as IFsFeatStruc);
if (Slice.Object.ClassID == PhPhonemeTags.kClassId)
m_PhonologicalFeatureListDlgLauncherView.Phoneme = Slice.Object as IPhPhoneme;
}
开发者ID:bbriggs,项目名称:FieldWorks,代码行数:17,代码来源:PhonologicalFeatureListDlgLauncher.cs
示例17: MorphTypeChooser
/// <summary>
/// constructor for use with adding a new value
/// </summary>
/// <param name="labels"></param>
/// <param name="fieldName">the user-readable name of the field that is being edited
/// </param>
public MorphTypeChooser(IPersistenceProvider persistProvider,
ObjectLabelCollection labels, string fieldName, ICmObject obj, string displayNameProperty,
int flid, string sShowAllTypes) :
base(persistProvider, labels, fieldName)
{
m_obj = obj;
m_displayNameProperty = displayNameProperty;
m_flid = flid;
InitMorphTypeForm(sShowAllTypes);
}
开发者ID:sillsdev,项目名称:WorldPad,代码行数:16,代码来源:MorphTypeChooser.cs
示例18: MorphTypeChooser
/// <summary>
/// constructor for use with adding a new value
/// </summary>
/// <param name="persistProvider">The persist provider.</param>
/// <param name="labels">The labels.</param>
/// <param name="fieldName">the user-readable name of the field that is being edited</param>
/// <param name="obj">The obj.</param>
/// <param name="displayNameProperty">The display name property.</param>
/// <param name="flid">The flid.</param>
/// <param name="sShowAllTypes">The show all types string.</param>
public MorphTypeChooser(IPersistenceProvider persistProvider,
IEnumerable<ObjectLabel> labels, string fieldName, ICmObject obj, string displayNameProperty,
int flid, string sShowAllTypes, IHelpTopicProvider helpTopicProvider) :
base(persistProvider, labels, fieldName, helpTopicProvider)
{
m_obj = obj;
m_displayNameProperty = displayNameProperty;
m_flid = flid;
InitMorphTypeForm(sShowAllTypes);
}
开发者ID:bbriggs,项目名称:FieldWorks,代码行数:20,代码来源:MorphTypeChooser.cs
示例19: 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_autoComplete = new PossibilityAutoComplete(cache, mediator, (ICmPossibilityList) obj.ReferenceTargetOwner(flid),
m_vectorRefView, displayNameProperty, displayWs);
m_autoComplete.PossibilitySelected += HandlePossibilitySelected;
m_vectorRefView.RootBox.DataAccess.AddNotification(this);
}
开发者ID:bbriggs,项目名称:FieldWorks,代码行数:12,代码来源:PossibilityVectorReferenceLauncher.cs
示例20: AtomicReferencePOSSlice
/// <summary>
/// Constructor.
/// </summary>
/// <param name="obj">CmObject that is being displayed.</param>
/// <param name="flid">The field identifier for the attribute we are displaying.</param>
/// // cache, obj, flid, node, persistenceProvider, stringTbl
public AtomicReferencePOSSlice(FdoCache cache, ICmObject obj, int flid,
IPersistenceProvider persistenceProvider, Mediator mediator)
: base(new UserControl(), cache, obj, flid)
{
IVwStylesheet stylesheet = FontHeightAdjuster.StyleSheetFromMediator(mediator);
m_persistProvider = persistenceProvider;
m_tree = new TreeCombo();
m_tree.WritingSystemFactory = cache.LanguageWritingSystemFactoryAccessor;
m_tree.WritingSystemCode = m_cache.LangProject.DefaultAnalysisWritingSystem;
m_tree.Font = new System.Drawing.Font(cache.LangProject.DefaultAnalysisWritingSystemFont, 10);
m_tree.StyleSheet = stylesheet;
if (!Application.RenderWithVisualStyles)
m_tree.HasBorder = false;
// 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 = 200;
Control.Controls.Add(m_tree);
if (m_pOSPopupTreeManager == null)
{
ICmPossibilityList list;
int ws;
if (obj is ReversalIndexEntry)
{
IReversalIndexEntry rie = obj as IReversalIndexEntry;
list = rie.ReversalIndex.PartsOfSpeechOA;
ws = rie.ReversalIndex.WritingSystemRAHvo;
}
else
{
list = m_cache.LangProject.PartsOfSpeechOA;
ws = m_cache.LangProject.DefaultAnalysisWritingSystem;
}
m_tree.WritingSystemCode = ws;
m_pOSPopupTreeManager = new POSPopupTreeManager(m_tree, m_cache, list, ws, false, mediator, (Form)mediator.PropertyTable.GetValue("window"));
m_pOSPopupTreeManager.AfterSelect += new TreeViewEventHandler(m_pOSPopupTreeManager_AfterSelect);
}
try
{
m_handlingMessage = true;
m_pOSPopupTreeManager.LoadPopupTree(POS == null ? 0 : POS.Hvo);
}
finally
{
m_handlingMessage = false;
}
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.
}
开发者ID:sillsdev,项目名称:WorldPad,代码行数:57,代码来源:AtomicReferencePOSSlice.cs
注:本文中的IPersistenceProvider类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论