mirror of
https://github.com/zoriya/octokit.net.git
synced 2026-06-03 11:05:56 +00:00
Initialize Files
Initialize Files to reduce needless setup to create a gist.
This commit is contained in:
committed by
Marius Ungureanu
parent
616ac3b425
commit
9d6345d0ea
@@ -33,10 +33,7 @@ public class GistsClientTests
|
||||
newGist.Description = "my new gist";
|
||||
newGist.Public = true;
|
||||
|
||||
var gistFiles = new Dictionary<string, string>();
|
||||
gistFiles.Add("myGistTestFile.cs", "new GistsClient(connection).Create();");
|
||||
|
||||
newGist.Files = gistFiles;
|
||||
newGist.Files.Add("myGistTestFile.cs", "new GistsClient(connection).Create();");
|
||||
|
||||
client.Create(newGist);
|
||||
|
||||
|
||||
@@ -1,9 +1,15 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics.CodeAnalysis;
|
||||
|
||||
namespace Octokit
|
||||
{
|
||||
public class NewGist
|
||||
{
|
||||
public NewGist()
|
||||
{
|
||||
Files = new Dictionary<string, string>();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// The description of the gist.
|
||||
/// </summary>
|
||||
|
||||
Reference in New Issue
Block a user