Files
IronRDP/ffi/dotnet/Devolutions.IronRdp/Generated/ConnectionActivationStateConnectionFinalization.cs

130 lines
3.2 KiB
C#

// <auto-generated/> by Diplomat
#pragma warning disable 0105
using System;
using System.Runtime.InteropServices;
using Devolutions.IronRdp.Diplomat;
#pragma warning restore 0105
namespace Devolutions.IronRdp;
#nullable enable
public partial class ConnectionActivationStateConnectionFinalization: IDisposable
{
private unsafe Raw.ConnectionActivationStateConnectionFinalization* _inner;
public DesktopSize DesktopSize
{
get
{
return GetDesktopSize();
}
}
public ushort IoChannelId
{
get
{
return GetIoChannelId();
}
}
public ushort UserChannelId
{
get
{
return GetUserChannelId();
}
}
/// <summary>
/// Creates a managed <c>ConnectionActivationStateConnectionFinalization</c> from a raw handle.
/// </summary>
/// <remarks>
/// Safety: you should not build two managed objects using the same raw handle (may causes use-after-free and double-free).
/// <br/>
/// This constructor assumes the raw struct is allocated on Rust side.
/// If implemented, the custom Drop implementation on Rust side WILL run on destruction.
/// </remarks>
public unsafe ConnectionActivationStateConnectionFinalization(Raw.ConnectionActivationStateConnectionFinalization* handle)
{
_inner = handle;
}
public ushort GetIoChannelId()
{
unsafe
{
if (_inner == null)
{
throw new ObjectDisposedException("ConnectionActivationStateConnectionFinalization");
}
ushort retVal = Raw.ConnectionActivationStateConnectionFinalization.GetIoChannelId(_inner);
return retVal;
}
}
public ushort GetUserChannelId()
{
unsafe
{
if (_inner == null)
{
throw new ObjectDisposedException("ConnectionActivationStateConnectionFinalization");
}
ushort retVal = Raw.ConnectionActivationStateConnectionFinalization.GetUserChannelId(_inner);
return retVal;
}
}
/// <returns>
/// A <c>DesktopSize</c> allocated on Rust side.
/// </returns>
public DesktopSize GetDesktopSize()
{
unsafe
{
if (_inner == null)
{
throw new ObjectDisposedException("ConnectionActivationStateConnectionFinalization");
}
Raw.DesktopSize* retVal = Raw.ConnectionActivationStateConnectionFinalization.GetDesktopSize(_inner);
return new DesktopSize(retVal);
}
}
/// <summary>
/// Returns the underlying raw handle.
/// </summary>
public unsafe Raw.ConnectionActivationStateConnectionFinalization* AsFFI()
{
return _inner;
}
/// <summary>
/// Destroys the underlying object immediately.
/// </summary>
public void Dispose()
{
unsafe
{
if (_inner == null)
{
return;
}
Raw.ConnectionActivationStateConnectionFinalization.Destroy(_inner);
_inner = null;
GC.SuppressFinalize(this);
}
}
~ConnectionActivationStateConnectionFinalization()
{
Dispose();
}
}