Skip to content
Merged
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
3 changes: 3 additions & 0 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@
# C# samples:
/csharp/** @BillWagner

# ML.NET samples:
/machine-learning/** @JRAlexander

#### Snippets (under samples)
# C++ snippets
/snippets/cpp/** @rpetrusha
Expand Down
25 changes: 0 additions & 25 deletions machine-learning/tutorials/IrisClustering.sln

This file was deleted.

26 changes: 0 additions & 26 deletions machine-learning/tutorials/IrisClustering/IrisClustering.csproj

This file was deleted.

32 changes: 0 additions & 32 deletions machine-learning/tutorials/IrisClustering/IrisData.cs

This file was deleted.

72 changes: 0 additions & 72 deletions machine-learning/tutorials/IrisClustering/Program.cs

This file was deleted.

17 changes: 0 additions & 17 deletions machine-learning/tutorials/IrisClustering/TestIrisData.cs

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -28,24 +28,24 @@ public class SimpleWebToken : SecurityToken

NameValueCollection _properties;
//</Snippet3>
string _serilaizedToken;
string _serializedToken;

/// <summary>
/// Initializes a new instance of the <see cref="SimpleWebToken"/> class.
/// This is internal contructor is only called from the <see cref="SimpleWebTokenHandler"/> when reading a token received from the wire.
/// This is an internal constructor that is only called from the <see cref="SimpleWebTokenHandler"/> when reading a token received from the wire.
/// </summary>
/// <param name="properties">The collection represents all the key value pairs in the token.</param>
/// <param name="properties">The collection representing all the key value pairs in the token.</param>
/// <param name="serializedToken">The serialized form of the token.</param>
internal SimpleWebToken( NameValueCollection properties, string serializedToken )
: this(properties)
{
_serilaizedToken = serializedToken;
_serializedToken = serializedToken;
}

/// <summary>
/// Initializes a new instance of the <see cref="SimpleWebToken"/> class.
/// </summary>
/// <param name="properties">The collection represents all the key value pairs in the token.</param>
/// <param name="properties">The collection representing all the key value pairs in the token.</param>
public SimpleWebToken( NameValueCollection properties )
{
if ( properties == null )
Expand Down Expand Up @@ -103,7 +103,7 @@ public override DateTime ValidFrom
/// <summary>
/// Gets the time when the token expires.
/// </summary>
/// <value>The time upto which the token is valid.</value>
/// <value>The time up to which the token is valid.</value>
public override DateTime ValidTo
{
get
Expand Down Expand Up @@ -158,7 +158,7 @@ public string SerializedToken
{
get
{
return _serilaizedToken;
return _serializedToken;
}
}

Expand All @@ -173,7 +173,7 @@ public NameValueCollection GetAllProperties()

//<Snippet8>
/// <summary>
/// Convert the time in seconds to a <see cref="DateTime"/> object based on the base time
/// Converts the time in seconds to a <see cref="DateTime"/> object based on the base time
/// defined by the Simple Web Token.
/// </summary>
/// <param name="expiryTime">The time in seconds.</param>
Expand Down
2 changes: 1 addition & 1 deletion snippets/csharp/concepts/lambda-expressions/tuples2.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ public class Example
public static void Main()
{
var numbers = (2, 3, 4, 5, 6);
Func<(int n1, int n2, int n3, int n4, int n5), (int, int, int, int, int)> doubleThem = (n) => (n.n1 * 2, n2 * 2, n.n3 * 2, n.n4 * 2, n.n5 * 2);
Func<(int n1, int n2, int n3, int n4, int n5), (int, int, int, int, int)> doubleThem = (n) => (n.n1 * 2, n.n2 * 2, n.n3 * 2, n.n4 * 2, n.n5 * 2);
var doubledNumbers = doubleThem(numbers);

Console.WriteLine("The set {0} doubled: {1}", numbers, doubledNumbers);
Expand Down
15 changes: 15 additions & 0 deletions snippets/fsharp/lang-ref-2/snippet6704.fs
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
```fsharp
[<Struct>]
type Foo =
val mutable bar: string
member self.ChangeBar bar = self.bar <- bar
new (bar) = {bar = bar}

let foo = Foo "1"
foo.ChangeBar "2" //make implicit copy of Foo, changes the copy, discards the copy, foo remains unchanged
printfn "%s" foo.bar //prints 1

let mutable foo' = Foo "1"
foo'.ChangeBar "2" //changes foo'
printfn "%s" foo'.bar //prints 2
```