Skip to content

Commit a37e0c6

Browse files
authored
Merge pull request #33 from microsoftgraph/vs-2019
Update training to use Visual Studio 2019
2 parents 30153e7 + aacc3cd commit a37e0c6

File tree

66 files changed

+557
-593
lines changed

Some content is hidden

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

66 files changed

+557
-593
lines changed

Demos/01-create-app/NuGet.config

Lines changed: 0 additions & 13 deletions
This file was deleted.

Demos/01-create-app/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
# Completed module: Create an ASP.NET MVC web app
22

3-
The version of the project in this directory reflects completing the tutorial up through [Create an ASP.NET MVC web app](https://docs.microsoft.com/graph/training/aspnet-tutorial?tutorial-step=1). If you use this version of the project, you need to complete the rest of the tutorial starting at [Register the app in the portal](https://docs.microsoft.com/graph/training/aspnet-tutorial?tutorial-step=2).
3+
The version of the project in this directory reflects completing the tutorial up through [Create an ASP.NET MVC web app](https://docs.microsoft.com/graph/tutorials/aspnet?tutorial-step=1). If you use this version of the project, you need to complete the rest of the tutorial starting at [Register the app in the portal](https://docs.microsoft.com/graph/tutorials/aspnet?tutorial-step=2).
Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,25 @@
11

22
Microsoft Visual Studio Solution File, Format Version 12.00
3-
# Visual Studio 15
4-
VisualStudioVersion = 15.0.28307.645
3+
# Visual Studio Version 16
4+
VisualStudioVersion = 16.0.29020.237
55
MinimumVisualStudioVersion = 10.0.40219.1
6-
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "graph-tutorial", "graph-tutorial\graph-tutorial.csproj", "{24928CC1-79F3-42ED-8B3F-9EB9A89006CD}"
6+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "graph-tutorial", "graph-tutorial\graph-tutorial.csproj", "{5DCE95C5-DFA9-4B74-BF3C-0F3FD99CC1DF}"
77
EndProject
88
Global
99
GlobalSection(SolutionConfigurationPlatforms) = preSolution
1010
Debug|Any CPU = Debug|Any CPU
1111
Release|Any CPU = Release|Any CPU
1212
EndGlobalSection
1313
GlobalSection(ProjectConfigurationPlatforms) = postSolution
14-
{24928CC1-79F3-42ED-8B3F-9EB9A89006CD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
15-
{24928CC1-79F3-42ED-8B3F-9EB9A89006CD}.Debug|Any CPU.Build.0 = Debug|Any CPU
16-
{24928CC1-79F3-42ED-8B3F-9EB9A89006CD}.Release|Any CPU.ActiveCfg = Release|Any CPU
17-
{24928CC1-79F3-42ED-8B3F-9EB9A89006CD}.Release|Any CPU.Build.0 = Release|Any CPU
14+
{5DCE95C5-DFA9-4B74-BF3C-0F3FD99CC1DF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
15+
{5DCE95C5-DFA9-4B74-BF3C-0F3FD99CC1DF}.Debug|Any CPU.Build.0 = Debug|Any CPU
16+
{5DCE95C5-DFA9-4B74-BF3C-0F3FD99CC1DF}.Release|Any CPU.ActiveCfg = Release|Any CPU
17+
{5DCE95C5-DFA9-4B74-BF3C-0F3FD99CC1DF}.Release|Any CPU.Build.0 = Release|Any CPU
1818
EndGlobalSection
1919
GlobalSection(SolutionProperties) = preSolution
2020
HideSolutionNode = FALSE
2121
EndGlobalSection
2222
GlobalSection(ExtensibilityGlobals) = postSolution
23-
SolutionGuid = {320B153C-72E6-4125-9280-DF6B5CF5C33F}
23+
SolutionGuid = {C0E9C678-1431-4614-A640-F5DBBC340412}
2424
EndGlobalSection
2525
EndGlobal

Demos/01-create-app/graph-tutorial/Content/Site.css

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/*
1+
/*
22
* Copyright (c) Microsoft Corporation. All rights reserved.
33
* Licensed under the MIT license.
44
*/
@@ -11,4 +11,4 @@ body {
1111
word-wrap: break-word;
1212
word-break: break-all;
1313
white-space: pre-wrap;
14-
}
14+
}

Demos/01-create-app/graph-tutorial/Models/Alert.cs

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,9 @@
11
// Copyright (c) Microsoft Corporation. All rights reserved.
22
// Licensed under the MIT license.
33

4-
using System;
5-
using System.Collections.Generic;
6-
using System.Linq;
7-
using System.Web;
8-
94
namespace graph_tutorial.Models
105
{
6+
// Used to flash error messages in the app's views.
117
public class Alert
128
{
139
public const string AlertKey = "TempDataAlerts";

Demos/01-create-app/graph-tutorial/Properties/AssemblyInfo.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
[assembly: ComVisible(false)]
2121

2222
// The following GUID is for the ID of the typelib if this project is exposed to COM
23-
[assembly: Guid("6e66f24f-326c-4887-8850-39549ae1ebcf")]
23+
[assembly: Guid("d8755180-bae3-4591-bbd2-b1eea25d037d")]
2424

2525
// Version information for an assembly consists of the following four values:
2626
//

Demos/01-create-app/graph-tutorial/Scripts/jquery.validate.unobtrusive.js

Lines changed: 32 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,23 @@
1-
/* NUGET: BEGIN LICENSE TEXT
2-
*
3-
* Microsoft grants you the right to use these script files for the sole
4-
* purpose of either: (i) interacting through your browser with the Microsoft
5-
* website or online service, subject to the applicable licensing or use
6-
* terms; or (ii) using the files as included with a Microsoft product subject
7-
* to that product's license terms. Microsoft reserves all other rights to the
8-
* files not expressly granted by Microsoft, whether by implication, estoppel
9-
* or otherwise. Insofar as a script file is dual licensed under GPL,
10-
* Microsoft neither took the code under GPL nor distributes it thereunder but
11-
* under the terms set out in this paragraph. All notices and licenses
12-
* below are for informational purposes only.
13-
*
14-
* NUGET: END LICENSE TEXT */
15-
/*!
16-
** Unobtrusive validation support library for jQuery and jQuery Validate
17-
** Copyright (C) Microsoft Corporation. All rights reserved.
18-
*/
1+
// Unobtrusive validation support library for jQuery and jQuery Validate
2+
// Copyright (c) .NET Foundation. All rights reserved.
3+
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
4+
// @version v3.2.11
195

206
/*jslint white: true, browser: true, onevar: true, undef: true, nomen: true, eqeqeq: true, plusplus: true, bitwise: true, regexp: true, newcap: true, immed: true, strict: false */
217
/*global document: false, jQuery: false */
228

23-
(function ($) {
9+
(function (factory) {
10+
if (typeof define === 'function' && define.amd) {
11+
// AMD. Register as an anonymous module.
12+
define("jquery.validate.unobtrusive", ['jquery-validation'], factory);
13+
} else if (typeof module === 'object' && module.exports) {
14+
// CommonJS-like environments that support module.exports
15+
module.exports = factory(require('jquery-validation'));
16+
} else {
17+
// Browser global
18+
jQuery.validator.unobtrusive = factory(jQuery);
19+
}
20+
}(function ($) {
2421
var $jQval = $.validator,
2522
adapters,
2623
data_validation = "unobtrusiveValidation";
@@ -84,11 +81,12 @@
8481
}
8582

8683
function onSuccess(error) { // 'this' is the form element
87-
var container = error.data("unobtrusiveContainer"),
88-
replaceAttrValue = container.attr("data-valmsg-replace"),
89-
replace = replaceAttrValue ? $.parseJSON(replaceAttrValue) : null;
84+
var container = error.data("unobtrusiveContainer");
9085

9186
if (container) {
87+
var replaceAttrValue = container.attr("data-valmsg-replace"),
88+
replace = replaceAttrValue ? $.parseJSON(replaceAttrValue) : null;
89+
9290
container.addClass("field-validation-valid").removeClass("field-validation-error");
9391
error.removeData("unobtrusiveContainer");
9492

@@ -120,7 +118,7 @@
120118
.removeClass("field-validation-error")
121119
.removeData("unobtrusiveContainer")
122120
.find(">*") // If we were using valmsg-replace, get the underlying error
123-
.removeData("unobtrusiveContainer");
121+
.removeData("unobtrusiveContainer");
124122
}
125123

126124
function validationInfo(form) {
@@ -131,7 +129,7 @@
131129
execInContext = function (name, args) {
132130
var func = defaultOptions[name];
133131
func && $.isFunction(func) && func.apply(form, args);
134-
}
132+
};
135133

136134
if (!result) {
137135
result = {
@@ -236,10 +234,10 @@
236234
// element with data-val=true
237235
var $selector = $(selector),
238236
$forms = $selector.parents()
239-
.addBack()
240-
.filter("form")
241-
.add($selector.find("form"))
242-
.has("[data-val=true]");
237+
.addBack()
238+
.filter("form")
239+
.add($selector.find("form"))
240+
.has("[data-val=true]");
243241

244242
$selector.find("[data-val=true]").each(function () {
245243
$jQval.unobtrusive.parseElement(this, true);
@@ -422,8 +420,13 @@
422420
setValidationValues(options, "regex", options.params.regex);
423421
}
424422
});
423+
adapters.add("fileextensions", ["extensions"], function (options) {
424+
setValidationValues(options, "extension", options.params.extensions);
425+
});
425426

426427
$(function () {
427428
$jQval.unobtrusive.parse(document);
428429
});
429-
}(jQuery));
430+
431+
return $jQval.unobtrusive;
432+
}));

0 commit comments

Comments
 (0)