public IntPtr GetRoleDelegate() { if (IntPtr.Zero == _roleDelegatePointer) { lock (_delegatelock) { if (IntPtr.Zero == _roleDelegatePointer) { RoleFunctionDelegate d = new RoleFunctionDelegate(RoleHandler); if (null != d) { IntPtr p = Marshal.GetFunctionPointerForDelegate(d); if (IntPtr.Zero != p) { Thread.MemoryBarrier(); _roleDelegate = d; _roleDelegatePointer = p; } } } } } return(_roleDelegatePointer); }
public IntPtr GetRoleDelegate() { if (IntPtr.Zero == _roleDelegatePointer) { lock (_delegatelock) { if (IntPtr.Zero == _roleDelegatePointer) { RoleFunctionDelegate d = new RoleFunctionDelegate(PipelineRuntime.RoleHandler); if (d != null) { IntPtr functionPointerForDelegate = Marshal.GetFunctionPointerForDelegate(d); if (IntPtr.Zero != functionPointerForDelegate) { Thread.MemoryBarrier(); _roleDelegate = d; _roleDelegatePointer = functionPointerForDelegate; } } } } } return(_roleDelegatePointer); }
public IntPtr GetRoleDelegate() { if (IntPtr.Zero == _roleDelegatePointer) { lock (_delegatelock) { if (IntPtr.Zero == _roleDelegatePointer) { RoleFunctionDelegate d = new RoleFunctionDelegate(PipelineRuntime.RoleHandler); if (d != null) { IntPtr functionPointerForDelegate = Marshal.GetFunctionPointerForDelegate(d); if (IntPtr.Zero != functionPointerForDelegate) { Thread.MemoryBarrier(); _roleDelegate = d; _roleDelegatePointer = functionPointerForDelegate; } } } } } return _roleDelegatePointer; }
public IntPtr GetRoleDelegate() { if (IntPtr.Zero == _roleDelegatePointer) { lock (_delegatelock) { if (IntPtr.Zero == _roleDelegatePointer) { RoleFunctionDelegate d = new RoleFunctionDelegate(RoleHandler); if (null != d) { IntPtr p = Marshal.GetFunctionPointerForDelegate(d); if (IntPtr.Zero != p) { Thread.MemoryBarrier(); _roleDelegate = d; _roleDelegatePointer = p; } } } } } return _roleDelegatePointer; }