{
if (propertyNotificationNotifyEventHandler != null)
{
- var process = global::System.Diagnostics.Process.GetCurrentProcess().Id;
+ var process = global::System.Diagnostics.Process.GetCurrentProcess();
+ var processId = process.Id;
var thread = global::System.Threading.Thread.CurrentThread.ManagedThreadId;
var me = this.GetType().FullName;
Tizen.Log.Error("NUI", $"Error! NUI's native dali object is already disposed. " +
$"OR the native dali object handle of NUI becomes null! \n" +
- $" process:{process} thread:{thread}, isDisposed:{this.Disposed}, isDisposeQueued:{this.IsDisposeQueued}, me:{me}\n");
+ $" process:{processId} thread:{thread}, isDisposed:{this.Disposed}, isDisposeQueued:{this.IsDisposeQueued}, me:{me}\n");
+
+ process.Dispose();
}
}
else
{
if (this.IsDisposeQueued)
{
- var process = global::System.Diagnostics.Process.GetCurrentProcess().Id;
+ var process = global::System.Diagnostics.Process.GetCurrentProcess();
+ var processId = process.Id;
var thread = global::System.Threading.Thread.CurrentThread.ManagedThreadId;
var me = this.GetType().FullName;
//in this case, this object is ready to be disposed waiting on DisposeQueue, so event callback should not be invoked!
Tizen.Log.Error("NUI", "in this case, the View object is ready to be disposed waiting on DisposeQueue, so event callback should not be invoked! just return here! \n" +
- $"process:{process} thread:{thread}, isDisposed:{this.Disposed}, isDisposeQueued:{this.IsDisposeQueued}, me:{me}\n");
+ $"process:{processId} thread:{thread}, isDisposed:{this.Disposed}, isDisposeQueued:{this.IsDisposeQueued}, me:{me}\n");
+
+ process.Dispose();
return;
}
}
{
if (detectedEventHandler != null)
{
- var process = global::System.Diagnostics.Process.GetCurrentProcess().Id;
+ var process = global::System.Diagnostics.Process.GetCurrentProcess();
+ var processId = process.Id;
var thread = global::System.Threading.Thread.CurrentThread.ManagedThreadId;
var me = this.GetType().FullName;
Tizen.Log.Error("NUI", $"Error! NUI's native dali object is already disposed. " +
$"OR the native dali object handle of NUI becomes null! \n" +
- $" process:{process} thread:{thread}, isDisposed:{this.Disposed}, isDisposeQueued:{this.IsDisposeQueued}, me:{me}\n");
+ $" process:{processId} thread:{thread}, isDisposed:{this.Disposed}, isDisposeQueued:{this.IsDisposeQueued}, me:{me}\n");
+
+ process.Dispose();
}
}
else
{
if (this.IsDisposeQueued)
{
- var process = global::System.Diagnostics.Process.GetCurrentProcess().Id;
+ var process = global::System.Diagnostics.Process.GetCurrentProcess();
+ var processId = process.Id;
var thread = global::System.Threading.Thread.CurrentThread.ManagedThreadId;
var me = this.GetType().FullName;
//in this case, this object is ready to be disposed waiting on DisposeQueue, so event callback should not be invoked!
Tizen.Log.Error("NUI", "in this case, the View object is ready to be disposed waiting on DisposeQueue, so event callback should not be invoked! just return here! \n" +
- $"process:{process} thread:{thread}, isDisposed:{this.Disposed}, isDisposeQueued:{this.IsDisposeQueued}, me:{me}\n");
+ $"process:{processId} thread:{thread}, isDisposed:{this.Disposed}, isDisposeQueued:{this.IsDisposeQueued}, me:{me}\n");
+
+ process.Dispose();
return;
}
}
&& resource.GetType().GetTypeInfo().IsGenericType
&& (resource.GetType().GetGenericTypeDefinition() == typeof(OnPlatform<>)))
{
- var tType = resource.GetType().GenericTypeArguments[0];
- var opImplicit = tType.GetImplicitConversionOperator(fromType: tType, toType: propertyType)
- ?? propertyType.GetImplicitConversionOperator(fromType: tType, toType: propertyType);
-
- if (opImplicit != null)
+ var typeArgs = resource.GetType().GenericTypeArguments;
+ if (typeArgs != null)
{
- //convert the OnPlatform<T> to T
- var opPlatformImplicitConversionOperator = resource?.GetType().GetImplicitConversionOperator(fromType: resource?.GetType(), toType: tType);
- resource = opPlatformImplicitConversionOperator?.Invoke(null, new[] { resource });
+ var tType = typeArgs[0];
+ var opImplicit = tType.GetImplicitConversionOperator(fromType: tType, toType: propertyType)
+ ?? propertyType.GetImplicitConversionOperator(fromType: tType, toType: propertyType);
+
+ if (opImplicit != null)
+ {
+ //convert the OnPlatform<T> to T
+ var opPlatformImplicitConversionOperator = resource?.GetType().GetImplicitConversionOperator(fromType: resource?.GetType(), toType: tType);
+ resource = opPlatformImplicitConversionOperator?.Invoke(null, new[] { resource });
- //and convert to toType
- resource = opImplicit.Invoke(null, new[] { resource });
- return resource;
+ //and convert to toType
+ resource = opImplicit.Invoke(null, new[] { resource });
+ return resource;
+ }
}
}
}