mirror of https://github.com/dahall/Vanara.git
Added enums to triggers and cleaned up code.
parent
5e9fff54ef
commit
4fc48f2082
|
@ -2,10 +2,12 @@ using System;
|
||||||
using System.Diagnostics;
|
using System.Diagnostics;
|
||||||
using System.Runtime.InteropServices;
|
using System.Runtime.InteropServices;
|
||||||
using Vanara.InteropServices;
|
using Vanara.InteropServices;
|
||||||
|
// ReSharper disable UnusedMember.Global
|
||||||
|
// ReSharper disable InconsistentNaming
|
||||||
|
|
||||||
namespace Vanara.PInvoke
|
namespace Vanara.PInvoke
|
||||||
{
|
{
|
||||||
public static partial class MSTask
|
public static class MSTask
|
||||||
{
|
{
|
||||||
/// <summary>Valid types of triggers</summary>
|
/// <summary>Valid types of triggers</summary>
|
||||||
public enum TASK_TRIGGER_TYPE
|
public enum TASK_TRIGGER_TYPE
|
||||||
|
@ -856,7 +858,7 @@ namespace Vanara.PInvoke
|
||||||
void Delete([In, MarshalAs(UnmanagedType.LPWStr)] string pwszName);
|
void Delete([In, MarshalAs(UnmanagedType.LPWStr)] string pwszName);
|
||||||
|
|
||||||
/// <summary>The NewWorkItem method creates a new work item, allocating space for the work item and retrieving its address.</summary>
|
/// <summary>The NewWorkItem method creates a new work item, allocating space for the work item and retrieving its address.</summary>
|
||||||
/// <param name="pwszTaskName ">
|
/// <param name="pwszTaskName">
|
||||||
/// A null-terminated string that specifies the name of the new work item. This name must conform to Windows NT file-naming conventions, but cannot
|
/// A null-terminated string that specifies the name of the new work item. This name must conform to Windows NT file-naming conventions, but cannot
|
||||||
/// include backslashes because nesting within the task folder object is not allowed.
|
/// include backslashes because nesting within the task folder object is not allowed.
|
||||||
/// </param>
|
/// </param>
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,26 @@
|
||||||
|
using NUnit.Framework;
|
||||||
|
using System;
|
||||||
|
using System.Runtime.InteropServices;
|
||||||
|
using static Vanara.PInvoke.TaskSchd;
|
||||||
|
|
||||||
|
namespace Vanara.PInvoke.Tests
|
||||||
|
{
|
||||||
|
[TestFixture]
|
||||||
|
public class TaskSchdTests
|
||||||
|
{
|
||||||
|
[Test]
|
||||||
|
public void SettingsTest()
|
||||||
|
{
|
||||||
|
var ts = new ITaskService();
|
||||||
|
var t = ts.NewTask(0);
|
||||||
|
var settings = t.Settings;
|
||||||
|
//settings.DeleteExpiredTaskAfter = TimeSpan.FromDays(1);
|
||||||
|
//Assert.That(settings.DeleteExpiredTaskAfter, Is.EqualTo(TimeSpan.FromDays(1)));
|
||||||
|
//settings.DeleteExpiredTaskAfter = TimeSpan.Zero;
|
||||||
|
//Assert.That(settings.DeleteExpiredTaskAfter, Is.Null);
|
||||||
|
Marshal.ReleaseComObject(settings);
|
||||||
|
Marshal.ReleaseComObject(t);
|
||||||
|
Marshal.ReleaseComObject(ts);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -109,6 +109,7 @@
|
||||||
<Compile Include="PInvoke\Shared\WinNT\OBJECT_TYPE_LISTTests.cs" />
|
<Compile Include="PInvoke\Shared\WinNT\OBJECT_TYPE_LISTTests.cs" />
|
||||||
<Compile Include="PInvoke\Shared\WinUser\MacrosTests.cs" />
|
<Compile Include="PInvoke\Shared\WinUser\MacrosTests.cs" />
|
||||||
<Compile Include="PInvoke\Shell32\KnownFolderIdExtTests.cs" />
|
<Compile Include="PInvoke\Shell32\KnownFolderIdExtTests.cs" />
|
||||||
|
<Compile Include="PInvoke\TaskSchd\TaskSchdTests.cs" />
|
||||||
<Compile Include="PInvoke\User32\User32Tests.cs" />
|
<Compile Include="PInvoke\User32\User32Tests.cs" />
|
||||||
<Compile Include="PInvoke\UxTheme\UxThemeTests.cs" />
|
<Compile Include="PInvoke\UxTheme\UxThemeTests.cs" />
|
||||||
<Compile Include="PInvoke\VirtDisk\VirtDiskTests.cs" />
|
<Compile Include="PInvoke\VirtDisk\VirtDiskTests.cs" />
|
||||||
|
|
Loading…
Reference in New Issue