本文整理汇总了C#中jvalue类的典型用法代码示例。如果您正苦于以下问题:C# jvalue类的具体用法?C# jvalue怎么用?C# jvalue使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
jvalue类属于命名空间,在下文中一共展示了jvalue类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: UnexportObject
/// <summary>
/// Unexports a previously exported object
/// </summary>
/// <param name="obj"><see cref="T:Java.Lang.Object" /></param>
/// <param name="force">if set to <c>true</c> [force unexport].</param>
/// <returns><c>true</c> if unexported, otherwise <c>false</c>.</returns>
public static bool UnexportObject(JuggerNETProxyObject javaProxyObject, bool force)
{
jvalue[] args = new jvalue[2];
using (JavaMethodArguments arguments = new JavaMethodArguments(args).Add(javaProxyObject).Add(force))
{
return mUnexportObject.CallBool(null, arguments);
}
}
示例2: RMICacheChannelConnector
/// <summary>
/// Initializes a new instance of the <see cref="RMICacheChannelConnector"/> class.
/// </summary>
/// <param name="host">Tridion Cache Channel RMI Host</param>
/// <param name="port">Tridion Cache Channel RMI Port</param>
/// <param name="instanceIdentifier">Tridion Instance identifier.</param>
public RMICacheChannelConnector(String host, int port, String instanceIdentifier)
: base(JNIHandle.NULL)
{
jvalue[] args = new jvalue[3];
using (JavaMethodArguments arguments = new JavaMethodArguments(args).Add(host).Add(port).Add(instanceIdentifier))
{
base.JObject = (long)mConstructor2.CallObject(this, arguments);
}
}
示例3: CacheEvent
/// <summary>
/// Initializes a new instance of the <see cref="CacheEvent" /> class.
/// </summary>
/// <param name="regionPath">Cache region path.</param>
/// <param name="key">Cache key as <see cref="T:System.Int32" /></param>
/// <param name="eventType"><see cref="T:TcmCDService.CacheTypes.CacheEventType" /></param>
public CacheEvent(string regionPath, int key, CacheEventType eventType)
: base(JNIHandle.NULL)
{
jvalue[] args = new jvalue[3];
using (JavaMethodArguments arguments = new JavaMethodArguments(args).Add(regionPath).Add(new Java.Lang.Integer(key)).Add((int)eventType))
{
base.JObject = (long)mConstructor.CallObject(this, arguments);
}
}
示例4: CacheInvalidatorCallback
public CacheInvalidatorCallback(ICacheInvalidator cacheInvalidator)
{
_invalidator = cacheInvalidator;
_callback = new GenericCallback((out int return_type, out jvalue return_value, IntPtr input) =>
{
try
{
string key = (string)JavaClass.GetTypedInstance(typeof(string), jvalue.From(input).l);
_invalidator.Invalidate(key);
return_value = new jvalue();
return_type = 0;
}
catch (Exception exception)
{
return_value = jvalue.CreateCBRetVal(exception);
return_type = 1;
}
return 0;
});
base.JObject = _constructor.construct(0, _callback);
}
示例5: CallStaticDoubleMethodA
internal static jdouble CallStaticDoubleMethodA(JNIEnv* pEnv, jclass clazz, jmethodID methodID, jvalue *args)
{
object o = InvokeHelper(pEnv, IntPtr.Zero, methodID, args, false);
if(o != null)
{
return (jdouble)(double)o;
}
return 0;
}
示例6: CallStaticBooleanMethodA
internal static jboolean CallStaticBooleanMethodA(JNIEnv* pEnv, jclass clazz, jmethodID methodID, jvalue *args)
{
object o = InvokeHelper(pEnv, IntPtr.Zero, methodID, args, false);
if(o != null)
{
return ((bool)o) ? JNI_TRUE : JNI_FALSE;
}
return JNI_FALSE;
}
示例7: CallNonvirtualVoidMethodA
internal static void CallNonvirtualVoidMethodA(JNIEnv* pEnv, jobject obj, jclass clazz, jmethodID methodID, jvalue* args)
{
InvokeHelper(pEnv, obj, methodID, args, true);
}
示例8: CallNonvirtualFloatMethodA
internal static jfloat CallNonvirtualFloatMethodA(JNIEnv* pEnv, jobject obj, jclass clazz, jmethodID methodID, jvalue* args)
{
object o = InvokeHelper(pEnv, obj, methodID, args, true);
if(o != null)
{
return (jfloat)(float)o;
}
return 0;
}
示例9: CallNonvirtualObjectMethodA
internal static jobject CallNonvirtualObjectMethodA(JNIEnv* pEnv, jobject obj, jclass clazz, jmethodID methodID, jvalue* args)
{
return pEnv->MakeLocalRef(InvokeHelper(pEnv, obj, methodID, args, true));
}
示例10: CallLongMethodA
internal static jlong CallLongMethodA(JNIEnv* pEnv, jobject obj, jmethodID methodID, jvalue* args)
{
object o = InvokeHelper(pEnv, obj, methodID, args, false);
if(o != null)
{
return (jlong)(long)o;
}
return 0;
}
示例11: CallDoubleMethod
public static double CallDoubleMethod(IntPtr obj, IntPtr methodID, jvalue[] args){}
示例12: CallFloatMethod
public static float CallFloatMethod(IntPtr obj, IntPtr methodID, jvalue[] args){}
示例13: CallCharMethod
public static char CallCharMethod(IntPtr obj, IntPtr methodID, jvalue[] args){}
示例14: CallByteMethod
public static byte CallByteMethod(IntPtr obj, IntPtr methodID, jvalue[] args){}
示例15: CallShortMethod
public static short CallShortMethod(IntPtr obj, IntPtr methodID, jvalue[] args){}