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


C# JET_param类代码示例

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


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

示例1: GetIntegerParameter

 /// <summary>
 /// Get a system parameter which is an integer.
 /// </summary>
 /// <param name="param">The parameter to get.</param>
 /// <returns>The value of the parameter.</returns>
 private int GetIntegerParameter(JET_param param)
 {
     int value = 0;
     string ignored;
     Api.JetGetSystemParameter(this.instance, this.sesid, param, ref value, out ignored, 0);
     return value;
 }
开发者ID:subTee,项目名称:DSInternals,代码行数:12,代码来源:InstanceParameters.cs

示例2: GetBooleanParameter

        /// <summary>
        /// Retrieve a boolean parameter.
        /// </summary>
        /// <param name="param">The parameter to retrieve.</param>
        /// <returns>The parameter value.</returns>
        private bool GetBooleanParameter(JET_param param)
        {
            int value = 0;
            string ignored;

            Api.JetGetSystemParameter(this.instance, JET_SESID.Nil, param, ref value, out ignored, 0);
            return 0 != value;
        }
开发者ID:925coder,项目名称:ravendb,代码行数:13,代码来源:InstanceParameterTests.cs

示例3: GetBoolParameter

 /// <summary>
 /// Get a system parameter which is a boolean.
 /// </summary>
 /// <param name="param">The parameter to get.</param>
 /// <returns>The value of the parameter.</returns>
 private bool GetBoolParameter(JET_param param)
 {
     int value = 0;
     string ignored;
     Api.JetGetSystemParameter(this.instance, this.sesid, param, ref value, out ignored, 0);
     return value != 0;
 }
开发者ID:subTee,项目名称:DSInternals,代码行数:12,代码来源:InstanceParameters.cs

示例4: SetStringParameter

 /// <summary>
 /// Set a system parameter which is a string.
 /// </summary>
 /// <param name="param">The parameter to set.</param>
 /// <param name="value">The value to set.</param>
 private static void SetStringParameter(JET_param param, string value)
 {
     Api.JetSetSystemParameter(JET_INSTANCE.Nil, JET_SESID.Nil, param, 0, value);
 }
开发者ID:nick121212,项目名称:xima_desktop3,代码行数:9,代码来源:SystemParameters.cs

示例5: GetIntPtrParameter

 /// <summary>
 /// Get a system parameter which is an IntPtr.
 /// </summary>
 /// <param name="param">The parameter to get.</param>
 /// <returns>The value of the parameter.</returns>
 private IntPtr GetIntPtrParameter(JET_param param)
 {
     IntPtr value = IntPtr.Zero;
     string ignored;
     Api.JetGetSystemParameter(this.instance, this.sesid, param, ref value, out ignored, 0);
     return value;
 }
开发者ID:nick121212,项目名称:xima_desktop3,代码行数:12,代码来源:Windows8InstanceParameters.cs

示例6: SetIntegerParameter

 /// <summary>
 /// Set a system parameter which is an integer.
 /// </summary>
 /// <param name="param">The parameter to set.</param>
 /// <param name="value">The value to set.</param>
 private void SetIntegerParameter(JET_param param, int value)
 {
     Api.JetSetSystemParameter(this.instance, this.sesid, param, value, null);
 }
开发者ID:subTee,项目名称:DSInternals,代码行数:9,代码来源:InstanceParameters.cs

示例7: JetParameter

 /// <summary>
 /// Initializes a new instance of the JetParameter class.
 /// </summary>
 /// <param name="param">The parameter identifier.</param>
 /// <param name="value">The value of the parameter.</param>
 public JetParameter(JET_param param, int value)
 {
     this.param = param;
     this.strValue = null;
     this.intValue = value;
 }
开发者ID:925coder,项目名称:ravendb,代码行数:11,代码来源:JetParameter.cs

示例8: JetGetSystemParameter

        /// <summary>
        /// Gets database configuration options.
        /// </summary>
        /// <param name="instance">The instance to retrieve the options from.</param>
        /// <param name="sesid">The session to use.</param>
        /// <param name="paramid">The parameter to get.</param>
        /// <param name="paramValue">Returns the value of the parameter, if the value is an integer.</param>
        /// <param name="paramString">Returns the value of the parameter, if the value is a string.</param>
        /// <param name="maxParam">The maximum size of the parameter string.</param>
        /// <returns>An ESENT warning code.</returns>
        /// <remarks>
        /// <see cref="JET_param.ErrorToString"/> passes in the error number in the paramValue, which is why it is
        /// a ref parameter and not an out parameter.
        /// </remarks>
        public static JET_wrn JetGetSystemParameter(JET_INSTANCE instance, JET_SESID sesid, JET_param paramid, ref int paramValue, out string paramString, int maxParam)
        {
            var intValue = new IntPtr(paramValue);
            JET_wrn wrn = Api.Check(Impl.JetGetSystemParameter(instance, sesid, paramid, ref intValue, out paramString, maxParam));
            paramValue = intValue.ToInt32();

            return wrn;
        }
开发者ID:925coder,项目名称:ravendb,代码行数:22,代码来源:Api.cs

示例9: PathParameterTest

        /// <summary>
        /// Test setting and retrieving a system parameter that uses a path. A relative
        /// path is set but a full path is retrieved.
        /// </summary>
        /// <param name="param">The parameter to set.</param>
        /// <param name="expected">The path to set it to.</param>
        private static void PathParameterTest(JET_param param, string expected)
        {
            JET_INSTANCE instance;
            Api.JetCreateInstance(out instance, "PathParameterTest");
            try
            {
                Api.JetSetSystemParameter(instance, JET_SESID.Nil, param, 0, expected);

                int ignored = 0;
                string actual;
                Api.JetGetSystemParameter(instance, JET_SESID.Nil, param, ref ignored, out actual, 256);

                Assert.AreEqual(Path.Combine(Environment.CurrentDirectory, expected), actual);
            }
            finally
            {
                Api.JetTerm(instance);
            }
        }
开发者ID:925coder,项目名称:ravendb,代码行数:25,代码来源:SetGetSystemParameterTests.cs

示例10: SetIntegerParameter

 /// <summary>
 /// Set a system parameter which is an integer.
 /// </summary>
 /// <param name="param">The parameter to set.</param>
 /// <param name="value">The value to set.</param>
 private static void SetIntegerParameter(JET_param param, int value)
 {
     Api.JetSetSystemParameter(JET_INSTANCE.Nil, JET_SESID.Nil, param, value, null);
 }
开发者ID:madmonkey,项目名称:managed-esent,代码行数:9,代码来源:SystemParameters.cs

示例11: JetSetSystemParameter

 /// <summary>
 /// Sets database configuration options.
 /// </summary>
 /// <param name="instance">
 /// The instance to set the option on or <see cref="JET_INSTANCE.Nil"/>
 /// to set the option on all instances.
 /// </param>
 /// <param name="sesid">The session to use.</param>
 /// <param name="paramid">The parameter to set.</param>
 /// <param name="paramValue">The value of the parameter to set, if the parameter is a JET_CALLBACK.</param>
 /// <param name="paramString">The value of the parameter to set, if the parameter is a string type.</param>
 /// <returns>An ESENT warning code.</returns>
 public static JET_wrn JetSetSystemParameter(JET_INSTANCE instance, JET_SESID sesid, JET_param paramid, JET_CALLBACK paramValue, string paramString)
 {
     return Api.Check(Impl.JetSetSystemParameter(instance, sesid, paramid, paramValue, paramString));
 }
开发者ID:925coder,项目名称:ravendb,代码行数:16,代码来源:Api.cs

示例12: SetBoolParameter

 /// <summary>
 /// Set a system parameter which is a boolean.
 /// </summary>
 /// <param name="param">The parameter to set.</param>
 /// <param name="value">The value to set.</param>
 private static void SetBoolParameter(JET_param param, bool value)
 {
     int setting = value ? 1 : 0;
     Api.JetSetSystemParameter(JET_INSTANCE.Nil, JET_SESID.Nil, param, 1, null);
 }
开发者ID:madmonkey,项目名称:managed-esent,代码行数:10,代码来源:SystemParameters.cs

示例13: GetIntegerParameter

 /// <summary>
 /// Get a system parameter which is an integer.
 /// </summary>
 /// <param name="param">The parameter to get.</param>
 /// <returns>The value of the parameter.</returns>
 private static int GetIntegerParameter(JET_param param)
 {
     int value = 0;
     string ignored;
     Api.JetGetSystemParameter(JET_INSTANCE.Nil, JET_SESID.Nil, param, ref value, out ignored, 0);
     return value;
 }
开发者ID:madmonkey,项目名称:managed-esent,代码行数:12,代码来源:SystemParameters.cs

示例14: JetGetSystemParameter

 /// <summary>
 /// Gets database configuration options.
 /// </summary>
 /// <param name="instance">The instance to retrieve the options from.</param>
 /// <param name="sesid">The session to use.</param>
 /// <param name="paramid">The parameter to get.</param>
 /// <param name="paramValue">Returns the value of the parameter, if the value is an integer.</param>
 /// <param name="paramString">Returns the value of the parameter, if the value is a string.</param>
 /// <param name="maxParam">The maximum size of the parameter string.</param>
 /// <returns>An ESENT warning code.</returns>
 /// <remarks>
 /// <see cref="JET_param.ErrorToString"/> passes in the error number in the paramValue, which is why it is
 /// a ref parameter and not an out parameter.
 /// </remarks>
 public static JET_wrn JetGetSystemParameter(
     JET_INSTANCE instance,
     JET_SESID sesid,
     JET_param paramid,
     ref IntPtr paramValue,
     out string paramString,
     int maxParam)
 {
     return Api.Check(Impl.JetGetSystemParameter(instance, sesid, paramid, ref paramValue, out paramString, maxParam));
 }
开发者ID:nick121212,项目名称:xima_desktop3,代码行数:24,代码来源:Api.cs

示例15: GetStringParameter

 /// <summary>
 /// Get a system parameter which is a string.
 /// </summary>
 /// <param name="param">The parameter to get.</param>
 /// <returns>The value of the parameter.</returns>
 private string GetStringParameter(JET_param param)
 {
     int ignored = 0;
     string value;
     Api.JetGetSystemParameter(this.instance, this.sesid, param, ref ignored, out value, 1024);
     return value;
 }
开发者ID:subTee,项目名称:DSInternals,代码行数:12,代码来源:InstanceParameters.cs


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