Commit 23e13553 authored by Martin Finkel's avatar Martin Finkel

Add internal ctor to internal interop readonly struct for warning CS0649

It is being created by Marshal methods. Adding the ctor makes the compiler warning go away without having to pragma disable them.
parent a68d4111
......@@ -4,6 +4,13 @@ namespace LibVLCSharp.Shared
{
internal readonly struct MediaDiscovererDescriptionStructure
{
internal MediaDiscovererDescriptionStructure(IntPtr name, IntPtr longName, MediaDiscovererCategory category)
{
Name = name;
LongName = longName;
Category = category;
}
internal readonly IntPtr Name;
internal readonly IntPtr LongName;
internal readonly MediaDiscovererCategory Category;
......
......@@ -4,6 +4,13 @@ namespace LibVLCSharp.Shared
{
internal readonly struct MediaSlaveStructure
{
internal MediaSlaveStructure(IntPtr uri, MediaSlaveType type, uint priority)
{
Uri = uri;
Type = type;
Priority = priority;
}
internal readonly IntPtr Uri;
internal readonly MediaSlaveType Type;
internal readonly uint Priority;
......
......@@ -21,6 +21,11 @@ namespace LibVLCSharp.Shared
internal readonly struct SubtitleTrackStructure
{
internal readonly IntPtr Encoding;
internal SubtitleTrackStructure(IntPtr encoding)
{
Encoding = encoding;
}
}
/// <summary>
......
......@@ -4,6 +4,12 @@ namespace LibVLCSharp.Shared
{
internal readonly struct RendererDescriptionStructure
{
internal RendererDescriptionStructure(IntPtr name, IntPtr longName)
{
Name = name;
LongName = longName;
}
internal readonly IntPtr Name;
internal readonly IntPtr LongName;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment