Skip to content

Commit 6776660

Browse files
committed
Regen modules.
1 parent fb7cb3c commit 6776660

File tree

17,840 files changed

+4689108
-60
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

17,840 files changed

+4689108
-60
lines changed

src/Applications/Applications.sln

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
2+
Microsoft Visual Studio Solution File, Format Version 12.00
3+
# Visual Studio 15
4+
VisualStudioVersion = 15.0.26124.0
5+
MinimumVisualStudioVersion = 15.0.26124.0
6+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Microsoft.Graph.Applications", "Applications\Microsoft.Graph.Applications.csproj", "{4A551C2F-4FA1-4185-BE34-FF34F23279E2}"
7+
EndProject
8+
Global
9+
GlobalSection(SolutionConfigurationPlatforms) = preSolution
10+
Debug|Any CPU = Debug|Any CPU
11+
Debug|x64 = Debug|x64
12+
Debug|x86 = Debug|x86
13+
Release|Any CPU = Release|Any CPU
14+
Release|x64 = Release|x64
15+
Release|x86 = Release|x86
16+
EndGlobalSection
17+
GlobalSection(SolutionProperties) = preSolution
18+
HideSolutionNode = FALSE
19+
EndGlobalSection
20+
GlobalSection(ProjectConfigurationPlatforms) = postSolution
21+
{4A551C2F-4FA1-4185-BE34-FF34F23279E2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
22+
{4A551C2F-4FA1-4185-BE34-FF34F23279E2}.Debug|Any CPU.Build.0 = Debug|Any CPU
23+
{4A551C2F-4FA1-4185-BE34-FF34F23279E2}.Debug|x64.ActiveCfg = Debug|Any CPU
24+
{4A551C2F-4FA1-4185-BE34-FF34F23279E2}.Debug|x64.Build.0 = Debug|Any CPU
25+
{4A551C2F-4FA1-4185-BE34-FF34F23279E2}.Debug|x86.ActiveCfg = Debug|Any CPU
26+
{4A551C2F-4FA1-4185-BE34-FF34F23279E2}.Debug|x86.Build.0 = Debug|Any CPU
27+
{4A551C2F-4FA1-4185-BE34-FF34F23279E2}.Release|Any CPU.ActiveCfg = Release|Any CPU
28+
{4A551C2F-4FA1-4185-BE34-FF34F23279E2}.Release|Any CPU.Build.0 = Release|Any CPU
29+
{4A551C2F-4FA1-4185-BE34-FF34F23279E2}.Release|x64.ActiveCfg = Release|Any CPU
30+
{4A551C2F-4FA1-4185-BE34-FF34F23279E2}.Release|x64.Build.0 = Release|Any CPU
31+
{4A551C2F-4FA1-4185-BE34-FF34F23279E2}.Release|x86.ActiveCfg = Release|Any CPU
32+
{4A551C2F-4FA1-4185-BE34-FF34F23279E2}.Release|x86.Build.0 = Release|Any CPU
33+
EndGlobalSection
34+
EndGlobal
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
* text=auto
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
bin
2+
obj
3+
.vs
4+
generated
5+
internal
6+
exports
7+
tools
8+
custom/*.psm1
9+
test/*-TestResults.xml
10+
/*.ps1
11+
/*.ps1xml
12+
/*.psm1
13+
/*.snk
14+
/*.csproj
15+
/*.nuspec

src/Applications/Applications/Microsoft.Graph.Applications.psd1

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
#
44
# Generated by: Microsoft Corporation
55
#
6-
# Generated on: 8/20/2020
6+
# Generated on: 8/25/2020
77
#
88

99
@{
@@ -18,7 +18,7 @@ ModuleVersion = '0.9.2'
1818
CompatiblePSEditions = 'Core', 'Desktop'
1919

2020
# ID used to uniquely identify this module
21-
GUID = '50341dc3-a2ef-460f-b01d-a86dd49110e6'
21+
GUID = 'a014f2cc-f37d-45f2-81bc-8062e00945ca'
2222

2323
# Author of this module
2424
Author = 'Microsoft Corporation'
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
// ------------------------------------------------------------------------------
2+
// Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information.
3+
// ------------------------------------------------------------------------------
4+
5+
namespace Microsoft.Graph.PowerShell
6+
{
7+
using System;
8+
using System.Text.RegularExpressions;
9+
using System.Threading;
10+
using System.Threading.Tasks;
11+
using Microsoft.Graph.PowerShell.Runtime;
12+
13+
public static class EventExtensions
14+
{
15+
/// <summary>
16+
/// Print event details to the provided stream
17+
/// </summary>
18+
/// <param name="getEventData">The event data to print</param>
19+
/// <param name="signal">The delegate for signaling events to the runtime</param>
20+
/// <param name="token">The cancellation token for the request</param>
21+
/// <param name="streamName">The name of the stream to print data to</param>
22+
/// <param name="eventName">The name of the event to be printed</param>
23+
public static async void Print(this Func<EventArgs> getEventData, Func<string, CancellationToken, Func<EventArgs>, Task> signal, CancellationToken token, string streamName, string eventName)
24+
{
25+
var eventDisplayName = EventFactory.SplitPascalCase(eventName).ToUpperInvariant();
26+
var data = EventDataConverter.ConvertFrom(getEventData()); // also, we manually use our TypeConverter to return an appropriate type
27+
if (data.Id != Events.Verbose && data.Id != Events.Warning && data.Id != Events.Debug && data.Id != Events.Information && data.Id != Events.Error)
28+
{
29+
await signal(streamName, token, () => EventFactory.CreateLogEvent($"{eventDisplayName} The contents are '{data?.Id}' and '{data?.Message}'"));
30+
if (data != null)
31+
{
32+
await signal(streamName, token, () => EventFactory.CreateLogEvent($"{eventDisplayName} Parameter: '{data.Parameter}'\n{eventDisplayName} RequestMessage '{data.RequestMessage}'\n{eventDisplayName} Response: '{data.ResponseMessage}'\n{eventDisplayName} Value: '{data.Value}'"));
33+
await signal(streamName, token, () => EventFactory.CreateLogEvent($"{eventDisplayName} ExtendedData Type: '{data.ExtendedData?.GetType()}'\n{eventDisplayName} ExtendedData '{data.ExtendedData}'"));
34+
}
35+
}
36+
}
37+
}
38+
}
Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
// ------------------------------------------------------------------------------
2+
// Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information.
3+
// ------------------------------------------------------------------------------
4+
5+
using System;
6+
using System.Text.RegularExpressions;
7+
using System.Threading;
8+
using System.Threading.Tasks;
9+
using Microsoft.Graph.PowerShell.Runtime;
10+
11+
namespace Microsoft.Graph.PowerShell
12+
{
13+
public static class EventFactory
14+
{
15+
/// <summary>
16+
/// Create a tracing event containing a string message
17+
/// </summary>
18+
/// <param name="message">The string message to include in event data</param>
19+
/// <returns>Valid EventData containing the message</returns>
20+
public static EventData CreateLogEvent(Task<string> message)
21+
{
22+
return new EventData
23+
{
24+
Id = Guid.NewGuid().ToString(),
25+
Message = message.Result
26+
};
27+
}
28+
29+
/// <summary>
30+
/// Create a new debug message event
31+
/// </summary>
32+
/// <param name="message">The message</param>
33+
/// <returns>An event containing the debug message</returns>
34+
public static EventData CreateDebugEvent(string message)
35+
{
36+
return new EventData
37+
{
38+
Id = Events.Debug,
39+
Message = message
40+
};
41+
}
42+
43+
/// <summary>
44+
/// Create a new debug message event
45+
/// </summary>
46+
/// <param name="message">The message</param>
47+
/// <returns>An event containing the debug message</returns>
48+
public static EventData CreateWarningEvent(string message)
49+
{
50+
return new EventData
51+
{
52+
Id = Events.Warning,
53+
Message = message
54+
};
55+
}
56+
public static string SplitPascalCase(string word)
57+
{
58+
var regex = new Regex("([a-z]+)([A-Z])");
59+
var output = regex.Replace(word, "$1 $2");
60+
regex = new Regex("([A-Z])([A-Z][a-z])");
61+
return regex.Replace(output, "$1 $2");
62+
}
63+
64+
public static EventArgs CreateLogEvent(string message)
65+
{
66+
return new EventData
67+
{
68+
Id = Guid.NewGuid().ToString(),
69+
Message = message
70+
};
71+
}
72+
}
73+
}

0 commit comments

Comments
 (0)