Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>netcoreapp2.0</TargetFramework>
<TargetFramework>netcoreapp3.1</TargetFramework>
<AssemblyName>TS3QueryLib.Net.Core.TestApp</AssemblyName>
<OutputType>Exe</OutputType>
<PackageId>TS3QueryLib.Net.Core.TestApp</PackageId>
<RuntimeFrameworkVersion>2.0.3</RuntimeFrameworkVersion>
<PackageTargetFallback>$(PackageTargetFallback);dnxcore50</PackageTargetFallback>
<RuntimeFrameworkVersion>3.1.0</RuntimeFrameworkVersion>
<GenerateAssemblyTitleAttribute>false</GenerateAssemblyTitleAttribute>
<GenerateAssemblyDescriptionAttribute>false</GenerateAssemblyDescriptionAttribute>
<GenerateAssemblyProductAttribute>false</GenerateAssemblyProductAttribute>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,13 @@ public static T ConvertValue<T>(string parameterName, string parameterValue)
try
{
if (default(T) != null && parameterValue == null)
throw new InvalidCastException(string.Format("Can not cast null value of parameter '{0}' to target type '{1}'.", parameterName, targetType));

{
if (parameterName.Contains("client_icon_id"))
parameterValue = "0";
else
throw new InvalidCastException(string.Format("Can not cast null value of parameter '{0}' to target type '{1}'.", parameterName, targetType));
}

if (parameterValue != null && (targetType == typeof(uint) || targetType == typeof(uint?)))
{
decimal decimalValue = Convert.ToDecimal(parameterValue, CultureInfo.InvariantCulture);
Expand Down
5 changes: 4 additions & 1 deletion TS3QueryLib.Net.Core/Server/Commands/ChannelListCommand.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ namespace TS3QueryLib.Net.Core.Server.Commands
{
public class ChannelListCommand : ExecutableEntityListCommand<ChannelListEntry>
{
public ChannelListCommand(bool includeAll, bool includeTopics = false, bool includeFlags = false, bool includeVoiceInfo = false, bool includeLimits = false, bool includeIcon = false) : base("ChannelList")
public ChannelListCommand(bool includeAll, bool includeTopics = false, bool includeFlags = false, bool includeVoiceInfo = false, bool includeLimits = false, bool includeIcon = false, bool includeSecondsEmpty = false) : base("ChannelList")
{
if (includeTopics || includeAll)
AddOption("topic");
Expand All @@ -21,6 +21,9 @@ public ChannelListCommand(bool includeAll, bool includeTopics = false, bool incl

if (includeIcon || includeAll)
AddOption("icon");

if (includeSecondsEmpty || includeAll)
AddOption("secondsempty");
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,12 @@ public SpacerInfo SpacerInfo

public uint? ChannelIconId { get; protected set; }

#endregion

#region SecondsEmpty-Properties

public double? SecondsEmpty { get; protected set; }

#endregion
#endregion

Expand Down Expand Up @@ -106,6 +112,8 @@ protected void ApplyFrom(CommandParameterGroup currrentParameterGroup, CommandPa
MaxClients = currrentParameterGroup.GetParameterValue<int?>("channel_maxclients");
MaxFamilyClients = currrentParameterGroup.GetParameterValue<int?>("channel_maxfamilyclients");
ChannelIconId = currrentParameterGroup.GetParameterValue<uint?>("channel_icon_id");

SecondsEmpty = currrentParameterGroup.GetParameterValue<double?>("seconds_empty");
}

#endregion
Expand Down
2 changes: 1 addition & 1 deletion TS3QueryLib.Net.Core/TS3QueryLib.Net.Core.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<Copyright>Copyright © Jens Hofmann 2016</Copyright>
<AssemblyTitle>TS3QueryLib.Net.Core</AssemblyTitle>
<Authors>Jens Hofmann</Authors>
<TargetFrameworks>netstandard1.4;netstandard1.6;netstandard2.0</TargetFrameworks>
<TargetFrameworks>netstandard1.4;netstandard1.6;netstandard2.0;netstandard2.1</TargetFrameworks>
<AssemblyName>TS3QueryLib.Net.Core</AssemblyName>
<PackageId>TS3QueryLib.Net.Core</PackageId>
<PackageTags>TeamSpeak;Query;C#;CSharp</PackageTags>
Expand Down