本文整理汇总了C#中ISilDataAccess类的典型用法代码示例。如果您正苦于以下问题:C# ISilDataAccess类的具体用法?C# ISilDataAccess怎么用?C# ISilDataAccess使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
ISilDataAccess类属于命名空间,在下文中一共展示了ISilDataAccess类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: SimpleDataParser
public SimpleDataParser(IFwMetaDataCache mdc, IVwCacheDa cda)
{
m_mdc = mdc;
m_cda = cda;
m_sda = cda as ISilDataAccess;
m_wsf = m_sda.WritingSystemFactory;
}
示例2: HFSetView
/// ------------------------------------------------------------------------------------
/// <summary>
/// Creates a new HFSetView
/// </summary>
/// <param name="sda">The ISilDataAccess for the view</param>
/// <param name="vc">The view constructor used to create the view</param>
/// <param name="hvoHeader">The id of the PubHeader used to get the Header/Footer
/// information to display in the view</param>
/// ------------------------------------------------------------------------------------
public HFSetView(ISilDataAccess sda, HeaderFooterVc vc, int hvoHeader) : base()
{
m_sda = sda;
WritingSystemFactory = m_sda.WritingSystemFactory;
m_vc = vc;
m_hvoHeader = hvoHeader;
}
示例3: GetBoolean
/// <summary>
/// Get the boolean or integer model property as a boolean.
/// </summary>
/// <returns>
/// The regular boolean value for boolean properties.
/// For int model properties: 'false' for a '0' int value,
/// or 'true' for all other int values.
/// </returns>
public static bool GetBoolean(ISilDataAccess sda, int hvo, int tag)
{
if (sda == null) throw new ArgumentNullException("sda");
return (CellarPropertyType)sda.MetaDataCache.GetFieldType(tag) == CellarPropertyType.Boolean
? sda.get_BooleanProp(hvo, tag)
: sda.get_IntProp(hvo, tag) != 0;
}
示例4: MaxStringWidthForChartColumn
public MaxStringWidthForChartColumn(ConstChartVc vc, IVwStylesheet stylesheet, ISilDataAccess sda, int hvoRoot,
System.Drawing.Graphics graphics, int icolumn)
: base(stylesheet, sda, hvoRoot, graphics, icolumn)
{
m_vc = vc;
m_cLines = m_vc.LineChoices.Count;
m_paraWidths = new int[m_cLines];
}
示例5: TestSetup
public void TestSetup()
{
RegistryHelper.CompanyName = "SIL";
m_ISilDataAccess = VwCacheDaClass.Create();
ILgWritingSystemFactory wsf = new PalasoWritingSystemManager();
m_ISilDataAccess.WritingSystemFactory = wsf;
m_IVwCacheDa = (IVwCacheDa)m_ISilDataAccess;
}
示例6: PrintRootSite
/// ------------------------------------------------------------------------------------
/// <summary>
///
/// </summary>
/// <param name="sda"></param>
/// <param name="hvo"></param>
/// <param name="vc"></param>
/// <param name="frags"></param>
/// <param name="styleSheet"></param>
/// ------------------------------------------------------------------------------------
public PrintRootSite(ISilDataAccess sda, int hvo, IVwViewConstructor vc, int frags,
IVwStylesheet styleSheet)
{
m_sda = sda;
m_hvo = hvo;
m_vc = vc;
m_frags = frags;
m_styleSheet = styleSheet;
}
示例7: SetValueFromBoolean
/// <summary>
/// Set the given boolean to either a boolean or integer model property.
/// </summary>
public static void SetValueFromBoolean(ISilDataAccess sda, int hvo, int tag, bool newValue)
{
if (sda == null) throw new ArgumentNullException("sda");
if ((CellarPropertyType)sda.MetaDataCache.GetFieldType(tag) == CellarPropertyType.Boolean)
sda.SetBoolean(hvo, tag, newValue);
else
sda.SetInt(hvo, tag, newValue ? 1 : 0);
}
示例8: Init
/// ------------------------------------------------------------------------------------
/// <summary>
/// Initializer
/// </summary>
/// <param name="cache">The instance of the DB connection representing the channel
/// through which notifications come</param>
/// <param name="tag">The property tag that the caller wants to be notified about
/// </param>
/// ------------------------------------------------------------------------------------
internal void Init(FdoCache cache, int tag)
{
m_cache = cache;
if (cache.AddChangeWatcher(this))
{
m_sda = m_cache.MainCacheAccessor;
m_sda.AddNotification(this); // register this in the ISilDataAccess
}
m_Tag = tag;
}
示例9: AddAndInvokeIfRedo
internal int m_chvoDel; // On Do, Redo; #inserted on Undo.
/// <summary>
/// Make an instance and add it to the undo stack. Also, if it's the 'redo' action added after the
/// actual changes (fForRedo is true), issue the propchanged at once to complete the original action.
/// </summary>
public static ExtraPropChangedAction AddAndInvokeIfRedo(IActionHandler actionHandler, ISilDataAccess sda, int hvo, int tag, int
ihvo, int chvoIns, int chvoDel, bool fForRedo)
{
ExtraPropChangedAction action = new ExtraPropChangedAction(sda, hvo, tag, ihvo, chvoIns, chvoDel, fForRedo);
actionHandler.AddAction(action);
if (fForRedo)
action.Redo();
return action;
}
示例10: FindReplaceCollectorEnvBase
/// ------------------------------------------------------------------------------------
/// <summary>
/// Initializes a new instance of the <see cref="T:FindReplaceCollectorEnvBase"/> class.
/// </summary>
/// <param name="vc">The view constructor.</param>
/// <param name="sda">Date access to get prop values etc.</param>
/// <param name="hvoRoot">The root object to display.</param>
/// <param name="frag">The fragment.</param>
/// <param name="vwPattern">The find/replace pattern.</param>
/// <param name="searchKiller">Used to interrupt a find/replace</param>
/// <remarks>If the base environment is not null, it is used for various things,
/// such as obtaining 'outer object' information.</remarks>
/// ------------------------------------------------------------------------------------
public FindReplaceCollectorEnvBase(IVwViewConstructor vc, ISilDataAccess sda,
int hvoRoot, int frag, IVwPattern vwPattern, IVwSearchKiller searchKiller)
: base(null, sda, hvoRoot)
{
m_vc = vc;
m_frag = frag;
m_Pattern = vwPattern;
m_searchKiller = searchKiller;
m_textSourceInit = VwMappedTxtSrcClass.Create();
}
示例11: ExtraPropChangedAction
/// <summary>
/// Make one.
/// </summary>
public ExtraPropChangedAction(ISilDataAccess sda, int hvo, int tag, int
ihvo, int chvoIns, int chvoDel, bool fForRedo)
{
m_sda = sda;
m_hvo = hvo;
m_tag = tag;
m_ihvo = ihvo;
m_chvoIns = chvoIns;
m_chvoDel = chvoDel;
m_fForRedo = fForRedo;
}
示例12: FilterSdaDecorator
/// <summary>
/// Make one that wraps the specified cache and passes items in the specified property of the specified root object.
/// </summary>
public FilterSdaDecorator(ISilDataAccess domainDataByFlid, int mainFlid, int hvoRoot)
: base(domainDataByFlid)
{
m_mainFlid = mainFlid;
m_hvoRoot = hvoRoot;
int chvoReal = BaseSda.get_VecSize(m_hvoRoot, m_mainFlid);
using (ArrayPtr arrayPtr = MarshalEx.ArrayToNative(chvoReal, typeof (int)))
{
BaseSda.VecProp(m_hvoRoot, m_mainFlid, chvoReal, out chvoReal, arrayPtr);
m_validHvos = new Set<int>((int[])MarshalEx.NativeToArray(arrayPtr, chvoReal, typeof(int)));
}
}
示例13: FixtureSetup
public override void FixtureSetup()
{
base.FixtureSetup();
m_sda = Cache.DomainDataByFlid;
m_objectsToDispose = new DisposableObjectsSet<object>();
}
示例14: 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);
}
示例15: SyncWatcher
/// <summary>
/// Create one.
/// </summary>
/// <param name="cache"></param>
/// <param name="appGuid"></param>
public SyncWatcher(FdoCache cache, Guid appGuid)
{
m_cache = cache;
m_appGuid = appGuid;
m_sda = m_cache.MainCacheAccessor;
m_sda.AddNotification(this);
}