commit stringlengths 40 40 | subject stringlengths 4 1.73k | repos stringlengths 5 127k | old_file stringlengths 2 751 | new_file stringlengths 2 751 | new_contents stringlengths 1 8.98k | old_contents stringlengths 0 6.59k | license stringclasses 13
values | lang stringclasses 23
values |
|---|---|---|---|---|---|---|---|---|
7cc1a666bf22b31a4b133a1529345c20d93c8f3e | Create NullMessageBus.cs | wgraham17/Foundatio,FoundatioFx/Foundatio,exceptionless/Foundatio | src/Foundatio/Messaging/NullMessageBus.cs | src/Foundatio/Messaging/NullMessageBus.cs | using System;
using System.Threading;
using System.Threading.Tasks;
using Foundatio.Utility;
namespace Foundatio.Messaging {
public class NullMessageBus : IMessageBus {
public static readonly NullMessageBus Instance = new NullMessageBus();
public Task PublishAsync(Type messageType, object message,... | apache-2.0 | C# | |
b935c5e4217995d885389171a96c97655b2cc285 | Create Course.cs | Si-143/Application-and-Web-Development | Course.cs | Course.cs | public class Course
{
int cID;
string cName;
public int CourID{
get {return cID;}
set {cID = value;}
}
public string CourseName{
get {return cName;}
set {cName = value;}
}
public Course(int... | mit | C# | |
a299dc7ad66c961d7a64d52f531007793f37a240 | Create linq.cs | jreina/impractical-fizzbuzz-solutions,jreina/impractical-fizzbuzz-solutions,jreina/impractical-fizzbuzz-solutions,jreina/impractical-fizzbuzz-solutions,jreina/impractical-fizzbuzz-solutions,jreina/impractical-fizzbuzz-solutions,jreina/impractical-fizzbuzz-solutions | csharp/linq.cs | csharp/linq.cs | using System;
using System.Linq;
public class Program
{
public static void Main()
{
Enumerable
.Range(1,100)
.Select(FizzBuzz.FromNumber)
.ToList()
.ForEach(Console.WriteLine);
}
}
public class FizzBuzz
{
private readonly int _number;
private readonly string _fizzbuzz;
public FizzBuzz(int ... | mit | C# | |
78ad540c2720834671d2b42b04c86342c578cf3e | Add formatting related types | PowerShell/PowerShellEditorServices | src/PowerShellEditorServices.Protocol/LanguageServer/Formatting.cs | src/PowerShellEditorServices.Protocol/LanguageServer/Formatting.cs | //
// Copyright (c) Microsoft. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
//
using Microsoft.PowerShell.EditorServices.Protocol.MessageProtocol;
namespace Microsoft.PowerShell.EditorServices.Protocol.LanguageServer
{
public class Docu... | mit | C# | |
441a45726793a4f6120f21d2a6f57f4409bc506d | Create MeteorRing.cs | UnityCommunity/UnityLibrary | Scripts/Misc/MeteorRing.cs | Scripts/Misc/MeteorRing.cs | using UnityEngine;
using System.Collections;
// Usage: Attach to gameobject (enable gizmos to see Debug.DrawRay())
// reference: http://forum.unity3d.com/threads/procedural-generation-in-a-specific-shape-question.421659/
public class MeteorRing : MonoBehaviour
{
public int totalCount = 5000;
public float ring... | mit | C# | |
7c7704588a2e7aa03d976f959c419c3c446a81b6 | Create ProbabilityStateModel.cs | efruchter/UnityUtilities | ProbabilityStateModel.cs | ProbabilityStateModel.cs | using System.Collections;
using System;
/**
* A 1st order probabalistic model that can be used to model complex behaviours for A.I. or other processes.
*
* Designed to use minimal space and perform fast lookups.
* Built for fast Transitions O(log2(states)). Preparing the probabilities is O(n).
*
* After settin... | mit | C# | |
5bf1c1ae77c510bfc16cd8d797c18b68b2bcbd2d | Add PipelineCache tests | discosultan/VulkanCore | Tests/PipelineCacheTest.cs | Tests/PipelineCacheTest.cs | using System.Linq;
using VulkanCore.Tests.Utilities;
using Xunit;
using Xunit.Abstractions;
namespace VulkanCore.Tests
{
public class PipelineCacheTest : HandleTestBase
{
[Fact]
public void GetData()
{
var descriptorSetLayoutCreateInfo = new DescriptorSetLayoutCreateInfo(
... | mit | C# | |
ab878c1797699fba99059ae427bda4200658a8ff | Add SpatialQueryInfoCarrierTest. | azabluda/InfoCarrier.Core | test/InfoCarrier.Core.FunctionalTests/InMemory/Query/SpatialQueryInfoCarrierTest.cs | test/InfoCarrier.Core.FunctionalTests/InMemory/Query/SpatialQueryInfoCarrierTest.cs | // Copyright (c) on/off it-solutions gmbh. All rights reserved.
// Licensed under the MIT license. See license.txt file in the project root for license information.
namespace InfoCarrier.Core.FunctionalTests.InMemory.Query
{
using InfoCarrier.Core.FunctionalTests.TestUtilities;
using Microsoft.EntityFramework... | mit | C# | |
7f84dd2dc1efe9d309f069d7a46d863e487d1c06 | add failing tests | Research-Institute/json-api-dotnet-core,Research-Institute/json-api-dotnet-core,json-api-dotnet/JsonApiDotNetCore | test/JsonApiDotNetCoreExampleTests/Acceptance/Spec/Relationships.cs | test/JsonApiDotNetCoreExampleTests/Acceptance/Spec/Relationships.cs | using System.Net;
using System.Net.Http;
using System.Threading.Tasks;
using DotNetCoreDocs;
using DotNetCoreDocs.Models;
using DotNetCoreDocs.Writers;
using JsonApiDotNetCoreExample;
using Microsoft.AspNetCore.Hosting;
using Microsoft.AspNetCore.TestHost;
using Newtonsoft.Json;
using Xunit;
using JsonApiDotNetCore.Int... | mit | C# | |
ed7af4d11f71f4823f7477f855d21c034b05c75d | Add tests for #90 (#196) | hazzik/DelegateDecompiler | src/DelegateDecompiler.Tests/Issue90.cs | src/DelegateDecompiler.Tests/Issue90.cs | using System.Collections.Generic;
using System.Linq;
using NUnit.Framework;
namespace DelegateDecompiler.Tests
{
public class Issue90 : DecompilerTestsBase
{
public class Test
{
public string A { get; set; }
}
public class Test2
{
public List<... | mit | C# | |
46bdaded1c150781e3f72c0075439f71d68c3981 | Add missing file | shutej/tapcfg,shutej/tapcfg,shutej/tapcfg,shutej/tapcfg,shutej/tapcfg,shutej/tapcfg,shutej/tapcfg | trunk/src/bindings/ProtocolType.cs | trunk/src/bindings/ProtocolType.cs | /**
* tapcfg - A cross-platform configuration utility for TAP driver
* Copyright (C) 2008 Juho Vähä-Herttua
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* versio... | lgpl-2.1 | C# | |
f218e868e54bfc24f88a098902bc41013607ca5d | add CountingSort3.cs | regeldso/hrank | Algorithms/Sorting/CountingSort3.cs | Algorithms/Sorting/CountingSort3.cs | using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
class Solution {
static void Main(String[] args) {
int n = Convert.ToInt32(Console.ReadLine());
int[] ar = new int[n];
int[] ar_count = new int[100];
int[] helper_ar = new int[100];
in... | mit | C# | |
1814a265a6290cb01284db57a880f69ffa2e51e4 | Create Stack_ResizingStack.cs | amithegde/AlgorithmsAndDataStructures | src/Stack_ResizingStack.cs | src/Stack_ResizingStack.cs | void Main()
{
//Auto Resizing Stack
var stack = new ResizingStack();
stack.Push("1");
stack.Push("2");
stack.Push("3");
Console.WriteLine("\nsize: " + stack.Size + " Capacity: " + stack.StackCapacity);
stack.Push("4");
stack.Push("5");
stack.Push("6");
Console.WriteLine("\nsize: " + stack.Size + " Capacit... | mit | C# | |
b9173f085ddc95b5d599d68b7761de672e7c4bfa | Create EventVariant.cs | Moci1/ColorBox | EventVariant.cs | EventVariant.cs | using System;
namespace ColorBox
{
public class ValidEventArgs : EventArgs
{
public bool IsValid { get; set; }
}
}
| mit | C# | |
566d7a360cc3ad88a1dbde328863351e4972e492 | Set name for Avalonia thread to identify it more easily in debugger. | uoinfusion/Infusion | Infusion.Desktop/App.xaml.cs | Infusion.Desktop/App.xaml.cs | using System;
using System.Collections.Generic;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Threading;
using System.Threading.Tasks;
using System.Windows;
using Avalonia;
using Avalonia.Logging.Serilog;
namespace Infusion.Desktop
{
/// <summary>
/// Interaction logic for App... | using System;
using System.Collections.Generic;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Threading;
using System.Threading.Tasks;
using System.Windows;
using Avalonia;
using Avalonia.Logging.Serilog;
namespace Infusion.Desktop
{
/// <summary>
/// Interaction logic for App... | mit | C# |
92a4f30704e5e548cdca0e3291cc8e609db70060 | add missing file | bdb-opensource/whitelist-executer,bdb-opensource/whitelist-executer,bdb-opensource/whitelist-executer | WhitelistExecuter.Web/App_Start/ErrorHandler.cs | WhitelistExecuter.Web/App_Start/ErrorHandler.cs | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Web.Mvc;
using log4net;
namespace WhitelistExecuter.Web.App_Start
{
public class ErrorHandler : HandleErrorAttribute
{
protected static readonly ILog _logger = log4net.LogManager.GetLogger("Er... | mit | C# | |
2d36062159d8b3e5e77740eed2ec3c1305c2b60f | Add ClickableText | ppy/osu,2yangk23/osu,smoogipoo/osu,NeoAdonis/osu,UselessToucan/osu,smoogipoo/osu,UselessToucan/osu,ppy/osu,EVAST9919/osu,peppy/osu,EVAST9919/osu,UselessToucan/osu,ppy/osu,NeoAdonis/osu,ZLima12/osu,johnneijzen/osu,ZLima12/osu,johnneijzen/osu,peppy/osu,peppy/osu,NeoAdonis/osu,peppy/osu-new,2yangk23/osu,smoogipoo/osu,smoo... | osu.Game/Graphics/UserInterface/ClickableText.cs | osu.Game/Graphics/UserInterface/ClickableText.cs | // Copyright (c) 2007-2018 ppy Pty Ltd <contact@ppy.sh>.
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
using OpenTK.Graphics;
using osu.Framework.Allocation;
using osu.Framework.Audio;
using osu.Framework.Audio.Sample;
using osu.Framework.Graphics;
using osu.Framework.Gr... | mit | C# | |
339d87d3af09d262d124683dc916e7f52258bc25 | Create GenteControlD__.cs | MesoamericaAppsHackatonPanama2013/SimulacionDesastres | GenteControlD__.cs | GenteControlD__.cs | using UnityEngine;
using System.Collections;
public class GenteControlD__ : MonoBehaviour {
void OnCollisionEnter(Collision col){
if(col.collider.tag == "Player"){
Debug.Log("toca");
Destroy(gameObject);}
}
}
| mit | C# | |
9130e2590cfcc7286a09a907bffc996ad6b6b51c | Create browser.cs | ATailsLLC/BlocklandChrome | browser.cs | browser.cs | package BChrome
{
}
activatePackage(BChrome);
| apache-2.0 | C# | |
6ca4a2c16dfbae78488cee30b007f2226f485736 | Create GuidExtensions.cs | drawcode/labs-csharp | extensions/GuidExtensions.cs | extensions/GuidExtensions.cs | using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
public static class GuidExtensions {
public static bool IsNullOrEmpty(this Guid inst) {
if (inst != null && inst != new Guid()) {
return true;
}
return false;
}
public static Guid Zero... | mit | C# | |
e65a8709ce69ac12be985e08f1c53f869444c0df | Add class Axe.cs in Models/Gear/Weapons/Axe.cs | baretata/CSharpOOP-TeamRedCurrantGame | RibesTerra/Models/Gear/Weapons/Axe.cs | RibesTerra/Models/Gear/Weapons/Axe.cs | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Models.Gear.Items
{
class Axe
{
}
}
| mit | C# | |
9c4594b3f293da70132e9355fd5d6738a9ed7496 | add debug | yangyu19840716/Alpha | Assets/src/Debug.cs | Assets/src/Debug.cs | using UnityEngine;
using System.Collections.Generic;
class DebugModule
{
public static Material lineMaterial = null;
public static Material redlineMaterial = null;
public static Material greenlineMaterial = null;
public static GameObject circle = null;
public static void GLDrawLine(Vector3 start,... | mit | C# | |
f4fdd0dbe19c27a06dd654b83e05570e4f957833 | Add methods to refresh desktop and file explorer. | Si13n7/SilDev.CSharpLib | src/SilDev/Desktop.cs | src/SilDev/Desktop.cs | #region auto-generated FILE INFORMATION
// ==============================================
// This file is distributed under the MIT License
// ==============================================
//
// Filename: Desktop.cs
// Version: 2017-10-31 08:39
//
// Copyright (c) 2017, Si13n7 Developments (r)
// All rights reser... | mit | C# | |
be3cf68c86bb143e27c4c79a5e4b7792809cb840 | use 'zlib' compression method instead of 'deflate'. | dsp2003/GARbro,morkt/GARbro,dsp2003/GARbro,dsp2003/GARbro,morkt/GARbro | deflate.cs | deflate.cs | //! \file deflate.cs
//! \date Tue Jul 08 15:01:34 2014
//! \brief deflate file into zlib stream.
//
using System;
using System.IO;
using ZLibNet;
class Inflate
{
public static void Main (string[] args)
{
if (args.Length != 2)
{
Console.WriteLine ("U... | //! \file deflate.cs
//! \date Tue Jul 08 15:01:34 2014
//! \brief deflate file into zlib stream.
//
using System;
using System.IO;
using ZLibNet;
class Inflate
{
public static void Main (string[] args)
{
if (args.Length != 2)
return;
try
{
... | mit | C# |
2e48179d900e52ada9df98851bd6effae2ea5ff0 | Create TestMongoClientProvider.cs | tiksn/TIKSN-Framework | TIKSN.Framework.IntegrationTests/Data/Mongo/TestMongoClientProvider.cs | TIKSN.Framework.IntegrationTests/Data/Mongo/TestMongoClientProvider.cs | using Microsoft.Extensions.Configuration;
using TIKSN.Data.Mongo;
namespace TIKSN.Framework.IntegrationTests.Data.Mongo
{
public class TestMongoClientProvider : MongoClientProviderBase
{
public TestMongoClientProvider(IConfiguration configuration) : base(configuration, "Mongo")
{
}
... | mit | C# | |
377c53be28b4a24e7bc109891512246105f234ab | create an interface to abstract the notion of set for some security related classes. | nohros/must,nohros/must,nohros/must | src/base/common/security/auth/sets/ISecureSet.cs | src/base/common/security/auth/sets/ISecureSet.cs | using System;
using System.Collections.Generic;
using System.Text;
namespace Nohros.Security.Auth
{
public interface ISecureSet<T>
{
/// <summary>
/// Adds the specified element to the set.
/// </summary>
/// <param name="element">The element to add to the set.</param... | mit | C# | |
bbb7f71fa3a9056544a90ce54de688ef6e25e124 | Create rectangle.cs | HeyIamJames/Learning-C-,HeyIamJames/Learning-C- | rectangle.cs | rectangle.cs | //https://www.tutorialspoint.com/csharp/csharp_basic_syntax.htm
using System;
namespace RectangleApplication
{
class Rectangle
{
// member variables
double length;
double width;
public void Acceptdetails()
{
length = 4.5;
width = 3.5;
}
publ... | mit | C# | |
4cad51b9d5fdcd080c097276e3f5113bd55fe5e9 | Add UpdateSitelink example (#237) | googleads/google-ads-dotnet,googleads/google-ads-dotnet,googleads/google-ads-dotnet,googleads/google-ads-dotnet | examples/Extensions/UpdateSitelink.cs | examples/Extensions/UpdateSitelink.cs | // Copyright 2020 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in w... | apache-2.0 | C# | |
b10c786752aa3a2212cbcb9656556452ba29b710 | Create ButtonColorChange.cs | MatrixNAN/Unity-Artist-Tools | ButtonColorChange.cs | ButtonColorChange.cs | using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
public class ButtonColorChange : MonoBehaviour
{
public bool isClicked = false;
void Start()
{
if (isClicked)
{
var colors = GetComponent<Button> ().colors;
// This code should work but it does not becau... | apache-2.0 | C# | |
7305b38e15ba4eb31225c9772a8fb2659a7035e2 | Create LinqPivot.cs | slaceved/CSharp | LinqPivot.cs | LinqPivot.cs | using System.Linq;
using System.Data;
using System.Collections.Generic;
namespace Capstone_Game_Platform
{
internal class LinqPivot
{
public DataTable Pivot(DataTable dt, DataColumn pivotColumn, string pivotName)
{
DataTable temp = dt.Copy();
temp.Columns.Remove(pivotCol... | unlicense | C# | |
0f9d6cd72325b056126dd69711ffa453e87fbfb3 | Disable warning `CanExecuteChanged` is never used for ExecuteCommand. | kingsamchen/EasyKeeper | CommandHelper.cs | CommandHelper.cs | /*
@ 0xCCCCCCCC
*/
using System;
using System.Windows.Input;
namespace EasyKeeper {
// Provides a general implementation for commands.
// T must be of nullable, since the `param` in methods might be null.
class RelayCommand<T> : ICommand {
private readonly Action<T> _action;
private reado... | /*
@ 0xCCCCCCCC
*/
using System;
using System.Windows.Input;
namespace EasyKeeper {
// Provides a general implementation for commands.
// T must be of nullable, since the `param` in methods might be null.
class RelayCommand<T> : ICommand {
private readonly Action<T> _action;
private reado... | mit | C# |
52b0c3bb7087768944462f8f93b9e3d66395c63a | Make setters in attributes private | chitoku-k/CoreTweet,azyobuzin/LibAzyotter,cannorin/CoreTweet | CoreTweet.Shared/Attribute.cs | CoreTweet.Shared/Attribute.cs | // The MIT License (MIT)
//
// CoreTweet - A .NET Twitter Library supporting Twitter API 1.1
// Copyright (c) 2013-2015 CoreTweet Development Team
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the... | // The MIT License (MIT)
//
// CoreTweet - A .NET Twitter Library supporting Twitter API 1.1
// Copyright (c) 2013-2015 CoreTweet Development Team
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the... | mit | C# |
850ceab3a413b076efbc3d31037e63555e8388b5 | Add Explicit operator test | Ruhrpottpatriot/SemanticVersion | test/SemanticVersionTest/ConversionTests.cs | test/SemanticVersionTest/ConversionTests.cs | namespace SemanticVersionTest
{
using System;
using Semver;
using Xunit;
public class ConversionTests
{
[Fact]
public void Conversion()
{
Version dotNetVersion = new Version(1, 1, 1, 1);
SemanticVersion semanticVersion = (SemanticVersion)dotNetVer... | mit | C# | |
f51b50117dc22b7bb42e5f9d00c2eb8d8e3cddc8 | Fix GUIDs not being parsed from Strings | RonnChyran/snowflake,SnowflakePowered/snowflake,SnowflakePowered/snowflake,RonnChyran/snowflake,SnowflakePowered/snowflake,RonnChyran/snowflake | src/Snowflake.Support.Remoting.GraphQl/Types/GuidGraphType.cs | src/Snowflake.Support.Remoting.GraphQl/Types/GuidGraphType.cs | using System;
using GraphQL.Language.AST;
using GraphQL.Types;
namespace GraphQL.Types
{
public class GuidGraphType : ScalarGraphType
{
public GuidGraphType()
{
Name = "Guid";
Description = "Globally Unique Identifier.";
}
public override object ParseVa... | mpl-2.0 | C# | |
84ee8aac9552405b83a54fd7498fee1713fca650 | Create Joystick.cs | GibTreaty/Unity | Joystick.cs | Joystick.cs | using UnityEngine;
using UnityEngine.UI;
using UnityEngine.Events;
using UnityEngine.EventSystems;
using System.Collections;
#if UNITY_EDITOR
using UnityEditor;
#endif
namespace UnityEngine.UI {
[AddComponentMenu("UI/Joystick", 36), RequireComponent(typeof(RectTransform))]
public class Joystick : UIBehaviour, IBegi... | mit | C# | |
112c8515960ab4cdb762f9f0819d7ee5dd2f8a07 | Create GlobalSuppressions.cs | hprose/hprose-dotnet | proj/Hprose.RPC.AspNet/GlobalSuppressions.cs | proj/Hprose.RPC.AspNet/GlobalSuppressions.cs |
// This file is used by Code Analysis to maintain SuppressMessage
// attributes that are applied to this project.
// Project-level suppressions either have no target or are given
// a specific target and scoped to a namespace, type, member, etc.
[assembly: System.Diagnostics.CodeAnalysis.SuppressMessage("Globaliza... | mit | C# | |
eafa764e6d5915461d71f4918268bd5f19d42c19 | Implement room exists data contract | Zalodu/Schedutalk,Zalodu/Schedutalk | Schedutalk/Schedutalk/Schedutalk/Logic/KTHPlaces/RoomDataContract.cs | Schedutalk/Schedutalk/Schedutalk/Logic/KTHPlaces/RoomDataContract.cs | using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.Serialization;
using System.Text;
using System.Threading.Tasks;
namespace Schedutalk.Logic.KTHPlaces
{
[DataContract]
public class RoomDataContract
{
[DataMember(Name = "floorUid")]
public string FloorU... | mit | C# | |
e855be180178532e3b490d8da67aa8e3b5d86be7 | Create Program4.cs | neilopet/projecteuler_cs | Program4.cs | Program4.cs | /*
* Problem #4
* A palindromic number reads the same both ways. The largest palindrome made from the product of two 2-digit numbers is 9009 = 91 × 99.
* Find the largest palindrome made from the product of two 3-digit numbers.
*/
using System;
using System.Collections.Generic;
public class Problem4
{
public void... | mit | C# | |
7ce827d87d5912546fded4c1f59fb771f83e6b47 | add verifier template | distantcam/Fody,ColinDabritzViewpoint/Fody,GeertvanHorrik/Fody,Fody/Fody | Verifier.cs | Verifier.cs | using System.Diagnostics;
using System.IO;
using System.Text.RegularExpressions;
using Microsoft.Build.Utilities;
using NUnit.Framework;
public static class Verifier
{
public static void Verify(string beforeAssemblyPath, string afterAssemblyPath)
{
var before = Validate(beforeAssemblyPath);
va... | mit | C# | |
42be54248c6dae3db5db95bcffd9ba3544a8c1fe | Move toseperate file | michael-reichenauer/GitMind | GitMind/Utils/FatalExceptionEventArgs.cs | GitMind/Utils/FatalExceptionEventArgs.cs | namespace System
{
internal class FatalExceptionEventArgs : EventArgs
{
public string Message { get; }
public Exception Exception { get; }
public FatalExceptionEventArgs(string message, Exception exception)
{
Message = message;
Exception = exception;
}
}
} | mit | C# | |
5e0ad58fd3f8765756e1f29676ca7937843437ca | Create Helper.cs | burnsba/Toolbox,burnsba/Toolbox,burnsba/Toolbox | csharp/Helper.cs | csharp/Helper.cs | using Newtonsoft.Json;
using Newtonsoft.Json.Linq;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
namespace Toolbox
{
public static class Helper
{
public static IEnumerable<T> DefaultRange<T>(int start, int count)
{
foreach (var x in Enumerable.... | apache-2.0 | C# | |
fc203014af2d40d10fc816c145086533e108305c | Create IFunctional.cs | codecore/Functional,codecore/Functional | IFunctional.cs | IFunctional.cs | using System;
using System.IO;
using System.Collections.Generic;
namespace Functional.Contracts {
public delegate IEnumerable<string> GetStrings(StreamReader sr);
public interface IListener<T, U> { U Handle(T m); }
public interface ISomething<T> {
T Item { get; set; }
}
public interface ISo... | apache-2.0 | C# | |
ab9c11c086f705787bbae1fcf43c49855001a6f2 | Create TollBooth.cs | Carlzilla/TollBooth-CS | TollBooth.cs | TollBooth.cs | using System;
using ICities;
using ColossalFramework;
using UnityEngine;
namespace TollBooth
{
public class TollBooth : IUserMod
{
public string Description
{
get
{
return "Adds the ability for toolbooth assets to collect money.";
}
}... | mit | C# | |
7ae52b79a2e44a75ec443fa28022d979a8f38551 | Create 2014s3q4.cs | Mooophy/158212 | 2014s3q4.cs | 2014s3q4.cs | using System;
using System.Collections.Generic;
using System.Linq;
using System.Linq.Expressions;
using System.Text;
using System.Threading.Tasks;
using System.IO;
using System.Reflection.Emit;
namespace JuestForCshap
{
class Program
{
static string BmiSpan(float bmi)
{
if (bmi < ... | mit | C# | |
dbe1f77d00f5999b3d7ab3d3e4ee425ea625dcc1 | Create Customer.cs | dlidstrom/EventStoreLite | Customer.cs | Customer.cs | using System;
using System.IO;
using System.Linq;
namespace RavenEventStore
{
public class Customer : AggregateRoot<Customer>
{
private string name;
private bool hasChangedName;
private string previousName;
public Customer(string name)
{
if (name == null) th... | mit | C# | |
d2b00749ef71729555d393da7fef1dcdb84f5cbc | Add missing DynamicTexture.cs file from last commit | rryk/omp-server,RavenB/opensim,rryk/omp-server,Michelle-Argus/ArribasimExtract,OpenSimian/opensimulator,BogusCurry/arribasim-dev,EriHoss/OpenSim_0.8.2.0_Dev_LibLSLCC,bravelittlescientist/opensim-performance,QuillLittlefeather/opensim-1,EriHoss/OpenSim_0.8.2.0_Dev_LibLSLCC,ft-/arribasim-dev-extras,TomDataworks/opensim,M... | OpenSim/Region/CoreModules/Scripting/DynamicTexture/DynamicTexture.cs | OpenSim/Region/CoreModules/Scripting/DynamicTexture/DynamicTexture.cs | /*
* Copyright (c) Contributors, http://opensimulator.org/
* See CONTRIBUTORS.TXT for a full list of copyright holders.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
* * Redistributions of source code must r... | bsd-3-clause | C# | |
d16b83ea40bf879d0351afa58217031b6552e788 | Add Guid-based constructor to FolioPaymentIndicator | PietroProperties/holms.platformclient.net | csharp/HOLMS.Platform/HOLMS.Platform/Types/Extensions/Folio/FolioPaymentIndicator.cs | csharp/HOLMS.Platform/HOLMS.Platform/Types/Extensions/Folio/FolioPaymentIndicator.cs | using System;
using HOLMS.Support.Conversions;
namespace HOLMS.Types.Folio {
public partial class FolioPaymentIndicator {
public FolioPaymentIndicator(Guid id) {
Id = id.ToUUID();
}
}
}
| mit | C# | |
2bcc4322254bbce37a9da0a2ddfc4bf8140c9026 | Create VariableGridCell.cs | quoxel/VariableGridLayoutGroup | VariableGridCell.cs | VariableGridCell.cs | using UnityEngine.EventSystems;
namespace UnityEngine.UI
{
[AddComponentMenu("Layout/Variable Grid Layout Group Cell", 140)]
[RequireComponent(typeof(RectTransform))]
[ExecuteInEditMode]
public class VariableGridCell : UIBehaviour
{
[SerializeField]
private bool m_OverrideForceExpandWidth = false;
public vi... | mit | C# | |
c172ae954a7786a15d19ebd63e3935faf64bc0d4 | add attached property to dragablz item | Foglio1024/Tera-custom-cooldowns,Foglio1024/Tera-custom-cooldowns | TCC.Core/Utilities/Extensions/DragablzHeaderExtensions.cs | TCC.Core/Utilities/Extensions/DragablzHeaderExtensions.cs | using System.Windows;
namespace TCC.Utilities.Extensions
{
public class DragablzHeaderExtensions
{
public static float GetFrameOpacity(DependencyObject obj)
{
return (float)obj.GetValue(FrameOpacityProperty);
}
public static void SetFrameOpacity(DependencyObject obj... | mit | C# | |
259eea6fff59aa095b7059edcffbab3b1eb90ccd | Create TournamentReward.cs | OpenConquer/Tournaments | Tournaments/TournamentReward.cs | Tournaments/TournamentReward.cs | using System;
using System.Collections.Generic;
using OpenConquer.Network.GamePackets;
namespace OpenConquer.Game.Models.Tournaments
{
/// <summary>
/// Model for a tournament reward.
/// </summary>
public sealed class TournamentReward
{
/// <summary>
/// Gets or sets the money.
... | mit | C# | |
4d67f2f9f63137218cdc9b20c293ae043751c866 | Add test coverage of nested game usage | ppy/osu-framework,ppy/osu-framework,smoogipooo/osu-framework,ppy/osu-framework,ZLima12/osu-framework,ZLima12/osu-framework,peppy/osu-framework,peppy/osu-framework,peppy/osu-framework,smoogipooo/osu-framework | osu.Framework.Tests/Visual/Testing/TestSceneNestedGame.cs | osu.Framework.Tests/Visual/Testing/TestSceneNestedGame.cs | // Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
using System;
using NUnit.Framework;
using osu.Framework.Testing;
namespace osu.Framework.Tests.Visual.Testing
{
public class TestSceneNestedGame : FrameworkTestSce... | mit | C# | |
40c193a5e604610dccaee2e7089176fe775a7906 | Create Test2.cs | hueneburg/GitIncludeTest | dir1/dir2/dir1/Test2.cs | dir1/dir2/dir1/Test2.cs | This is a test
| bsd-3-clause | C# | |
44ea48638c9be1beda270e12c7950e0c0c79dc5a | Add Scroll rect by children component | insthync/unity-utilities | Assets/UnityUtilities/Scripts/Misc/ScrollRectByChildren.cs | Assets/UnityUtilities/Scripts/Misc/ScrollRectByChildren.cs | using System;
using UnityEngine;
using UnityEngine.EventSystems;
using UnityEngine.UI;
public class ScrollRectByChildren : MonoBehaviour,
IBeginDragHandler,
IDragHandler,
IEndDragHandler,
IScrollHandler
{
public ScrollRect scrollRect;
private void Awake()
{
if (scrollRect == nu... | mit | C# | |
206fc94b8c9e71be4dc3049003f63147bf735a22 | Add rotation drag handle component | UselessToucan/osu,smoogipooo/osu,ppy/osu,ppy/osu,UselessToucan/osu,smoogipoo/osu,NeoAdonis/osu,peppy/osu-new,peppy/osu,UselessToucan/osu,NeoAdonis/osu,NeoAdonis/osu,peppy/osu,smoogipoo/osu,ppy/osu,peppy/osu,smoogipoo/osu | osu.Game/Screens/Edit/Compose/Components/SelectionBoxRotationHandle.cs | osu.Game/Screens/Edit/Compose/Components/SelectionBoxRotationHandle.cs | // Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
using osu.Framework.Allocation;
using osu.Framework.Extensions.EnumExtensions;
using osu.Framework.Graphics;
using osu.Framework.Graphics.Sprites;
using osuTK;
using osuT... | mit | C# | |
8f2f024f9ec577aba7775cabb4b8159a57adc527 | Create extensions.cs | Kartessian/JSON-Sharp,Kartessian/JSON-Sharp | extensions.cs | extensions.cs | using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Data;
namespace Kartessian
{
public static class extensions
{
public static string ToJson(this DataTable dt)
{
List<Dictionary<string, object>> rows = new List<Dictionary<strin... | mit | C# | |
c1c2f79b550ece5086cc8d4d67ca160c6ea18278 | Add unit tests that that does not add much value yet | charlenni/Mapsui,charlenni/Mapsui | Tests/Mapsui.Tests/ViewportTests.cs | Tests/Mapsui.Tests/ViewportTests.cs | using NUnit.Framework;
namespace Mapsui.Tests
{
[TestFixture]
public class ViewportTests
{
[Test]
public void SetCenterTest()
{
// Arrange
var viewport = new Viewport();
// Act
viewport.SetCenter(10, 20);
// Assert
... | mit | C# | |
5ae32651869dec53203d4d1eea7cc90e36cb7d90 | Add HTTPRequest module | mage/mage-sdk-unity,AlmirKadric/mage-sdk-unity | HTTPRequest/HTTPRequest.cs | HTTPRequest/HTTPRequest.cs | using System;
using System.Collections.Generic;
using System.Net;
using System.IO;
using System.Text;
public class HTTPRequest {
public static void Get(string url, Dictionary<string, string> headers, Action<Exception, string> cb) {
// Initialize request instance
HttpWebRequest httpRequest = (HttpWebRequest)WebRe... | mit | C# | |
d0f7d7868a8cfe97957902fee538e875aff29258 | Create AssemblyInfo.cs | ClutchplateDude/xml-micro | Properties/AssemblyInfo.cs | Properties/AssemblyInfo.cs | ya
| mit | C# | |
fb657786562b1f8e6a1cc871ee2a33f9d1327e45 | Create mntp.cshtml | go4web/Umbraco-Snippets | mntp.cshtml | mntp.cshtml | @*
----- MNTP -----
*@
@if (homepage.HasProperty("headerNavigation")) {
<ul class="headerNavigation">
@foreach (var item in Umbraco.TypedContent(homepage.GetPropertyValue("headerNavigation").ToString().Split(','))) {
if (item != null)
{
<li><a href="@item.NiceUrl()">@Html.Raw(@item.GetPropertyValue("... | mit | C# | |
4ca445c2204b3b78bbf8261ec1e13a1bfb0e558a | Add PropertyChangeTracker utility class. | ZhangLeiCharles/mobile,eatskolnikov/mobile,eatskolnikov/mobile,masterrr/mobile,eatskolnikov/mobile,ZhangLeiCharles/mobile,masterrr/mobile,peeedge/mobile,peeedge/mobile | Phoebe/Data/Utils/PropertyChangeTracker.cs | Phoebe/Data/Utils/PropertyChangeTracker.cs | using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
namespace Toggl.Phoebe.Data.Utils
{
public sealed class PropertyChangeTracker : IDisposable
{
private readonly List<Listener> listeners = new List<Listener> ();
~PropertyChangeTracker ()
{
... | bsd-3-clause | C# | |
2cddedb20cdff28fc96b12df1eb346ae7ee05cfc | Update Enum.cs | cnascimento/RestSharp,dgreenbean/RestSharp,RestSharp-resurrected/RestSharp,restsharp/RestSharp,benfo/RestSharp,kouweizhong/RestSharp,periface/RestSharp,eamonwoortman/RestSharp.Unity,jiangzm/RestSharp,KraigM/RestSharp,fmmendo/RestSharp,chengxiaole/RestSharp,dmgandini/RestSharp,huoxudong125/RestSharp,mattleibow/RestSharp... | RestSharp/Enum.cs | RestSharp/Enum.cs | #region License
// Copyright 2010 John Sheehan
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by app... | #region License
// Copyright 2010 John Sheehan
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by app... | apache-2.0 | C# |
fbddcd40dec59c4b8e3ea2a34eeda720a8b4e6b9 | Create TraceLog.cs | wieslawsoltes/Core2D,wieslawsoltes/Core2D,wieslawsoltes/Core2D,wieslawsoltes/Core2D | src/Core2D/Modules/Log/Trace/TraceLog.cs | src/Core2D/Modules/Log/Trace/TraceLog.cs | #nullable enable
using System;
using Core2D.Model;
using SD = System.Diagnostics;
namespace Core2D.Modules.Log.Trace;
public sealed class TraceLog : ILog
{
// ReSharper disable once NotAccessedField.Local
private readonly IServiceProvider? _serviceProvider;
private const string InformationPrefix = "Info... | mit | C# | |
77bb5ea4cafd0c0764299900163f698e8865be47 | Add notification test | Shaddix/realm-dotnet,Shaddix/realm-dotnet,realm/realm-dotnet,realm/realm-dotnet,realm/realm-dotnet,Shaddix/realm-dotnet,Shaddix/realm-dotnet | Tests/IntegrationTests.Shared/NotificationTests.cs | Tests/IntegrationTests.Shared/NotificationTests.cs | using System;
using NUnit.Framework;
using Realms;
using System.Threading;
namespace IntegrationTests.Shared
{
[TestFixture]
public class NotificationTests
{
private string _databasePath;
private Realm _realm;
private void WriteOnDifferentThread(Action<Realm> action)
{
... | apache-2.0 | C# | |
4a71e12235583e540d041bf1c81692b35cd99c59 | add dropbox config parser | ayan4m1/shipsync,ayan4m1/shipsync | Container/Configuration/DropboxConfigModule.cs | Container/Configuration/DropboxConfigModule.cs | using System.IO;
using Autofac;
using log4net;
using Newtonsoft.Json;
namespace ShipSync.Container.Configuration
{
public class DropboxConfigModule : Module
{
private static readonly ILog Log = LogManager.GetLogger(typeof(DropboxConfigModule));
private readonly string _configPath;
pu... | mit | C# | |
4f47159729b2794f1211aa0f49b0f46c00b90765 | Create ArrayLine.cs | xxmon/unity | ArrayLine.cs | ArrayLine.cs | using UnityEngine;
using System.Collections;
using UnityEditor;
public class ArrayLine : MonoBehaviour {
public GameObject target;
public int numberToSpawn = 8;
public Vector3 space;
// Use this for initialization
void Start () {
}
// Update is called once per frame
void Update () {
}
public void R... | mit | C# | |
d589a7157ead62add73618a365ac73c8cb910657 | Set navigation bar translucent to false to fix views overlapping. Fix bug #14631 | nelzomal/monotouch-samples,albertoms/monotouch-samples,haithemaraissia/monotouch-samples,nervevau2/monotouch-samples,peteryule/monotouch-samples,robinlaide/monotouch-samples,andypaul/monotouch-samples,W3SS/monotouch-samples,davidrynn/monotouch-samples,labdogg1003/monotouch-samples,markradacz/monotouch-samples,nervevau2... | Rotation/HandlingRotation/AppDelegate.cs | Rotation/HandlingRotation/AppDelegate.cs | using System;
using MonoTouch.UIKit;
using MonoTouch.Foundation;
namespace HandlingRotation {
[Register("AppDelegate")]
public class AppDelegate : UIApplicationDelegate {
protected UIWindow window;
protected UINavigationController mainNavController;
protected HandlingRotation.Screens.iPhone.Home.HomeScreen iP... | using System;
using MonoTouch.UIKit;
using MonoTouch.Foundation;
namespace HandlingRotation {
[Register("AppDelegate")]
public class AppDelegate : UIApplicationDelegate {
protected UIWindow window;
protected UINavigationController mainNavController;
protected HandlingRotation.Screens.iPhone.Home.HomeScreen iP... | mit | C# |
4c8cd249cb88a96671d3010c133216f988ad8edd | Create Program.cs | AlexKoshulyan/NSDateToEpochTime | NSDateToEpochTime/Program.cs | NSDateToEpochTime/Program.cs | using System;
namespace NSDateToEpochTime
{
class Program
{
static void Main(string[] args)
{
try
{
if (args.Length != 1)
{
throw new ArgumentException("One argument expected");
}
double... | mit | C# | |
f8e3529a071fdb42e2acadbb3c06067be867c27e | Create Constants class. | VarLog/nano_magnetic.net | Nano/ClusterLib/Constants.cs | Nano/ClusterLib/Constants.cs | //
// The MIT License (MIT)
//
// Copyright (c) 2015 Maxim Fedorenko <varlllog@gmail.com>
// Copyright (c) 2015 Roman Shershnev <LarscoRS@yandex.ru>
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in... | mit | C# | |
beb39f2a33ecc64aa6e39bb0f61df8809bcea1b9 | change the version to 3.0.1 | RachelTucker/ds3_net_sdk,shabtaisharon/ds3_net_sdk,SpectraLogic/ds3_net_sdk,rpmoore/ds3_net_sdk,shabtaisharon/ds3_net_sdk,rpmoore/ds3_net_sdk,SpectraLogic/ds3_net_sdk,rpmoore/ds3_net_sdk,RachelTucker/ds3_net_sdk,shabtaisharon/ds3_net_sdk,SpectraLogic/ds3_net_sdk,RachelTucker/ds3_net_sdk | VersionInfo.cs | VersionInfo.cs | /*
* ******************************************************************************
* Copyright 2014 Spectra Logic Corporation. All Rights Reserved.
* Licensed under the Apache License, Version 2.0 (the "License"). You may not use
* this file except in compliance with the License. A copy of the License is loc... | /*
* ******************************************************************************
* Copyright 2014 Spectra Logic Corporation. All Rights Reserved.
* Licensed under the Apache License, Version 2.0 (the "License"). You may not use
* this file except in compliance with the License. A copy of the License is loc... | apache-2.0 | C# |
2ac1bc3845e7e916a27efb335bd37ddb49ab4852 | Create R5Crypt64.cs | auycro/AESCrypt | R5Crypt64.cs | R5Crypt64.cs | using System;
using RGiesecke.DllExport;
namespace R5Crypt64
{
public class R5Crypt64
{
//static PDFManipulate pdfmanipulate = new PDFManipulate();
[DllExport("TestMethod")]
static int TestMethod(string input)
{
int result = 0;
if (input != null) { re... | mit | C# | |
c74b40339b3b892c63c145ef5442221b40b82a33 | Create HooksDone.cs | Notulp/Pluton,Notulp/Pluton | HooksDone.cs | HooksDone.cs | public static void Command(Player player, string[] args)
// called if Chat().arg.StartsWith("/");
public static void Chat(ConsoleSystem.Arg arg)
// called when chat.say is executed
public static void Gathering(BaseResource res, HitInfo info)
// called when you gather wood, stone, ores
public static void NPCHurt(Base... | mit | C# | |
f1b2d60812c7cece3f8fcea52160ffe6da058c2d | Test to verify compiled query error was addressed in v4 changes. Closes GH-784 | mysticmind/marten,JasperFx/Marten,mysticmind/marten,JasperFx/Marten,mysticmind/marten,ericgreenmix/marten,ericgreenmix/marten,mysticmind/marten,ericgreenmix/marten,ericgreenmix/marten,JasperFx/Marten | src/Marten.Testing/Bugs/Bug_784_Collection_Contains_within_compiled_query.cs | src/Marten.Testing/Bugs/Bug_784_Collection_Contains_within_compiled_query.cs | using System;
using System.Collections.Generic;
using System.Linq;
using System.Linq.Expressions;
using Marten.Linq;
using Marten.Testing.Documents;
using Marten.Testing.Harness;
using Shouldly;
using Xunit;
using Xunit.Abstractions;
namespace Marten.Testing.Bugs
{
public class Bug_784_Collection_Contains_within_c... | mit | C# | |
418823bd86f5282e3508db223dd6ae6e70b467f4 | Create UserApi.cs | MingLu8/Nancy.WebApi.HelpPages | src/Nancy.WebApi.HelpPages.Demo/UserApi.cs | src/Nancy.WebApi.HelpPages.Demo/UserApi.cs | using System.Collections.Generic;
using Nancy.WebApi.AttributeRouting;
namespace Nancy.WebApi.Demo
{
/// <summary>
/// Web API for User.
/// </summary>
[RoutePrefix("api/userApi")]
public class UserApi : ApiController
{
/// <summary>
/// Gets all users.
/// </summ... | mit | C# | |
873c1c11acc3f6e82c3f022eb959cc1aafd040c3 | Add XAmzHeaderNames | carbon/Amazon | src/Amazon.Core/Security/XAmzHeaderNames.cs | src/Amazon.Core/Security/XAmzHeaderNames.cs | namespace Amazon.Security;
internal static class XAmzHeaderNames
{
public const string ContentSHA256 = "x-amz-content-sha256";
public const string DecodedContentLength = "x-amz-decoded-content-length";
public const string ChecksumCrc32 = "x-amz-checksum-crc32";
public const string Traile... | mit | C# | |
00b4f4d513b56721253d1573466c297e05f021b0 | add router that converts string url to resource url type | jensandresen/nappy | src/Nappy.Tests/TestRouter.cs | src/Nappy.Tests/TestRouter.cs | using System;
using Xunit;
namespace Nappy.Tests
{
public class TestRouter
{
[Theory]
[InlineData("foo", "1")]
[InlineData("foo", "2")]
[InlineData("bar", "1")]
[InlineData("bar", "2")]
public void returns_expected_when_extracting_resource_name_and_i... | mit | C# | |
99fdc7ea4cdff1845485918eecddc6af2ace7048 | Create fake-host.cs | axotion/Fake-Host | fake-host.cs | fake-host.cs | using System;
using System.IO;
using System.Security.Principal;
/* For example
* 127.0.0.1 google.com
* Where 127.0.0.1 is your server/whatever
* Also yo can run it with parametr xxx.xxx.xxx.xxx www.something.com
* */
class Var{
public static string IP = "127.0.0.1";
public static string Dest = "www.google.com";
... | mit | C# | |
cfb93904fd8b1f59455055cc8c6df2a164049554 | Create anonymous_type.cs | kenpusney/pastebin,kenpusney/pastebin | book/anonymous_type.cs | book/anonymous_type.cs | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.IO;
namespace CLR_via_CS
{
class Program
{
static void Main(string[] args)
{
String myDocuments = Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments);
var quer... | mit | C# | |
f9feb28f4a0687c71c39db40fb94ecb55cf22668 | Create EventStore.cs | dlidstrom/EventStoreLite | EventStore.cs | EventStore.cs | using System;
using System.Collections.Generic;
using Raven.Client;
namespace RavenEventStore
{
public class EventStore : IDisposable
{
private readonly ISet<IAggregate> unitOfWork
= new HashSet<IAggregate>(ObjectReferenceEqualityComparer<object>.Default);
private readonly IDocument... | mit | C# | |
476331bb47959eea044bd5036c0b1597bd75927c | Create Cam.cs | etormadiv/njRAT_0.7d_Stub_ReverseEngineering | j_csharp/OK/Cam.cs | j_csharp/OK/Cam.cs | //Reversed by Etor Madiv
public static bool Cam()
{
try
{
string captureDriverName = Microsoft.VisualBasic.Strings.Space(100);
string captureDriverDescription = null;
return capGetDriverDescriptionA( 0, ref captureDriverName, 100, ref captureDriverDescription, 100);
}
catch(Exception)
{
}
retur... | unlicense | C# | |
bc9216b7de267aa62eedf89322bd160c4dfffd70 | add missing file | ZanyGnu/GitRepoStats | RepoStats/Startup.cs | RepoStats/Startup.cs |
namespace RepoStats
{
using Microsoft.Owin;
using Microsoft.Owin.FileSystems;
using Microsoft.Owin.StaticFiles;
using Owin;
public class Startup
{
public void Configuration(IAppBuilder app)
{
// Remap '/' to '.\defaults\'.
// Turns on static files and d... | mit | C# | |
b0f03d60bb561e6ecca9d07e14f6d46d9dfe4fc2 | Create index.cshtml | Aleksandrovskaya/apmathclouddif | index.cshtml | index.cshtml | @{
var txt = DateTime.Now;
}
<html>
<body>
<p>The dateTime is @txt</p>
</body>
</html>
| mit | C# | |
380bb047d38d011a8d95f6940c168f38bc9e5020 | Add AspectCore.Lite.Abstractions/ITargetServiceProvider.cs | AspectCore/Abstractions,AspectCore/AspectCore-Framework,AspectCore/AspectCore-Framework,AspectCore/Lite | src/AspectCore.Lite.Abstractions/ITargetServiceProvider.cs | src/AspectCore.Lite.Abstractions/ITargetServiceProvider.cs | using System;
namespace AspectCore.Lite.Abstractions
{
[NonAspect]
public interface ITargetServiceProvider
{
object GetTarget(Type serviceType);
}
}
| mit | C# | |
09d3b0449a142f12668477a321e50dc73e84e99e | Add history endpoint | mike-kaufman/Glimpse.Prototype,peterblazejewicz/Glimpse.Prototype,mike-kaufman/Glimpse.Prototype,pranavkm/Glimpse.Prototype,pranavkm/Glimpse.Prototype,Glimpse/Glimpse.Prototype,zanetdev/Glimpse.Prototype,peterblazejewicz/Glimpse.Prototype,zanetdev/Glimpse.Prototype,Glimpse/Glimpse.Prototype,pranavkm/Glimpse.Prototype,p... | src/Glimpse.Server.Web/Broker/HttpClientChannelResource.cs | src/Glimpse.Server.Web/Broker/HttpClientChannelResource.cs | using Glimpse.Web;
using System;
using System.Text;
using System.Threading.Tasks;
namespace Glimpse.Server
{
public class HttpClientChannelResource : IRequestHandler
{
public bool WillHandle(IHttpContext context)
{
return context.Request.Path == "/Glimpse/Data/History";
}
... | mit | C# | |
99da5e3dee577d0613373263a5da285a28bf2d3c | Create test4.cs | neetsdkasu/Paiza-POH-MyAnswers,neetsdkasu/Paiza-POH-MyAnswers,neetsdkasu/Paiza-POH-MyAnswers,neetsdkasu/Paiza-POH-MyAnswers,neetsdkasu/Paiza-POH-MyAnswers,neetsdkasu/Paiza-POH-MyAnswers,neetsdkasu/Paiza-POH-MyAnswers,neetsdkasu/Paiza-POH-MyAnswers,neetsdkasu/Paiza-POH-MyAnswers,neetsdkasu/Paiza-POH-MyAnswers,neetsdkasu... | POH6plus/test4.cs | POH6plus/test4.cs | using System;
class H
{
static byte[] b=new byte[20000];
static int i,j,h,k,n=0,x,l=0,m,c=0,s,t;
static int[] p,q;
static int[][] z;
static System.IO.Stream o=Console.OpenStandardOutput();
static int cmp(int u,int v)
{
if (b[u]==b[v])
if (b[u]=='\n')
retur... | mit | C# | |
49151a1f3b0cc18c62ae1c17b2028102848a19bc | make DxfWipeout easier to instantiate correctly | IxMilia/Dxf,IxMilia/Dxf | src/IxMilia.Dxf/Entities/DxfWipeout.cs | src/IxMilia.Dxf/Entities/DxfWipeout.cs | // Copyright (c) IxMilia. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
namespace IxMilia.Dxf.Entities
{
public partial class DxfWipeout
{
/// <param name="imagePath">The path to the image.</param>
/// <para... | apache-2.0 | C# | |
ee1e16d28767011aae20dae99f7a4b861d4b8681 | Verify that an exception is thrown when more than one type matches | appharbor/appharbor-cli | src/AppHarbor.Tests/TypeNameMatcherTest.cs | src/AppHarbor.Tests/TypeNameMatcherTest.cs | using System;
using System.Collections.Generic;
using Xunit;
using Xunit.Extensions;
namespace AppHarbor.Tests
{
public class TypeNameMatcherTest
{
interface IFoo
{
}
class Foo : IFoo { }
private static Type FooType = typeof(Foo);
[Fact]
public void ShouldThrowIfInitializedWithUnnasignableType()
... | using System;
using System.Collections.Generic;
using Xunit;
using Xunit.Extensions;
namespace AppHarbor.Tests
{
public class TypeNameMatcherTest
{
interface IFoo
{
}
class Foo : IFoo { }
private static Type FooType = typeof(Foo);
[Fact]
public void ShouldThrowIfInitializedWithUnnasignableType()
... | mit | C# |
f6b48e68e68a4dd29c2be9ed58da88a1342bda54 | Create application lock file | TechGuard/background-changer | src/AppLock.cs | src/AppLock.cs | using System;
using System.IO;
namespace BackgroundChanger
{
class AppLock : IDisposable
{
public static readonly string LockFile = Path.Combine(Config.ApplicationFolder, ".locked");
/// <summary>
/// Check if lock file exists
/// </summary>
public static bool ... | mit | C# | |
3285b8f0e868daa80a2aef5542d5e4a7f930a65f | Make member non-static | picklesdoc/pickles,dirkrombauts/pickles,magicmonty/pickles,picklesdoc/pickles,magicmonty/pickles,dirkrombauts/pickles,ludwigjossieaux/pickles,picklesdoc/pickles,ludwigjossieaux/pickles,picklesdoc/pickles,magicmonty/pickles,magicmonty/pickles,dirkrombauts/pickles,dirkrombauts/pickles,ludwigjossieaux/pickles | src/Pickles/Pickles.TestFrameworks/XUnit/XUnit1/XUnit1SingleResultLoader.cs | src/Pickles/Pickles.TestFrameworks/XUnit/XUnit1/XUnit1SingleResultLoader.cs | using System;
using System.IO.Abstractions;
using PicklesDoc.Pickles.ObjectModel;
namespace PicklesDoc.Pickles.TestFrameworks.XUnit.XUnit1
{
public class XUnit1SingleResultLoader : ISingleResultLoader
{
private readonly XDocumentLoader documentLoader = new XDocumentLoader();
public ITestResu... | using System;
using System.IO.Abstractions;
using PicklesDoc.Pickles.ObjectModel;
namespace PicklesDoc.Pickles.TestFrameworks.XUnit.XUnit1
{
public class XUnit1SingleResultLoader : ISingleResultLoader
{
private static readonly XDocumentLoader DocumentLoader = new XDocumentLoader();
public IT... | apache-2.0 | C# |
94f7f6fe22e4284e18c44c549c952dd563cceb59 | Rebase finalisation | binaryjanitor/allReady,BillWagner/allReady,arst/allReady,mgmccarthy/allReady,arst/allReady,c0g1t8/allReady,c0g1t8/allReady,jonatwabash/allReady,arst/allReady,BillWagner/allReady,gitChuckD/allReady,bcbeatty/allReady,VishalMadhvani/allReady,GProulx/allReady,anobleperson/allReady,VishalMadhvani/allReady,MisterJames/allRea... | AllReadyApp/Web-App/AllReady/Services/Mapping/Routing/OptimizeRouteStatus.cs | AllReadyApp/Web-App/AllReady/Services/Mapping/Routing/OptimizeRouteStatus.cs | namespace AllReady.Services.Mapping.Routing
{
public class OptimizeRouteResultStatus
{
public bool IsSuccess { get; set; } = true;
public string StatusMessage { get; set; }
}
}
| mit | C# | |
50272f34d6ef5977264085e6d2a66d2d45b0be92 | add GetHostWithSchema extension | tugberkugurlu/tugberk-web,tugberkugurlu/tugberk-web,tugberkugurlu/tugberk-web,tugberkugurlu/tugberk-web | src/Tugberk.Web/RequestExtensions.cs | src/Tugberk.Web/RequestExtensions.cs | using Microsoft.AspNetCore.Http;
namespace Tugberk.Web
{
public static class RequestExtensions
{
public static string GetHostWithSchema(this HttpRequest request)
{
var schema = request.IsHttps ? "https" : "http";
return $"{schema}://{request.Host.Value}".TrimEnd('/');
... | agpl-3.0 | C# | |
4c9c65856ca117dd34122e4987c3c0570902d077 | Remove the nullable disable annotation in the testing beatmap and mark some of the properties as nullable. | peppy/osu,ppy/osu,ppy/osu,ppy/osu,peppy/osu,peppy/osu | osu.Game/Tests/Beatmaps/TestWorkingBeatmap.cs | osu.Game/Tests/Beatmaps/TestWorkingBeatmap.cs | // Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
using System.IO;
using osu.Framework.Audio;
using osu.Framework.Audio.Track;
using osu.Framework.Graphics.Textures;
using osu.Game.Beatmaps;
using osu.Game.Skinning;
usi... | // Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
#nullable disable
using System.IO;
using osu.Framework.Audio;
using osu.Framework.Audio.Track;
using osu.Framework.Graphics.Textures;
using osu.Game.Beatmaps;
using osu... | mit | C# |
9ed6c360da737f091b39c4ad38dd8165f9d6cbcc | add a sql helper so we can use almost straight sql to query db | YoloDev/elephanet,YoloDev/elephanet,jmkelly/elephanet,jmkelly/elephanet | Elephanet/Sql.cs | Elephanet/Sql.cs | using System;
using System.Collections.Generic;
using System.Linq;
using Npgsql;
using System.Text;
using System.Text.RegularExpressions;
using System.Globalization;
using System.Threading;
namespace Elephanet
{
public class Sql<T>
{
private NpgsqlCommand _command;
public Sql(string query, ob... | mit | C# | |
e7a26fea1bb3f01f70d7b91859ee2ae1747530e4 | Create World.cs | benharold/hello-world-collection,benharold/hello-world-collection,benharold/hello-world-collection,benharold/hello-world-collection,benharold/hello-world-collection,benharold/hello-world-collection,benharold/hello-world-collection,benharold/hello-world-collection,benharold/hello-world-collection,benharold/hello-world-c... | csharp/World.cs | csharp/World.cs | using System;
static class Program
{
static void Main(string[] args)
{
Console.WriteLine("Hello World");
}
}
| mit | C# | |
d279776613aeddec6d137e44e776e90a7016518b | bump version | ColinDabritzViewpoint/Fody,huoxudong125/Fody,Fody/Fody,ichengzi/Fody,furesoft/Fody,jasonholloway/Fody,GeertvanHorrik/Fody,distantcam/Fody | CommonAssemblyInfo.cs | CommonAssemblyInfo.cs | using System.Reflection;
[assembly: AssemblyTitle("Fody")]
[assembly: AssemblyProduct("Fody")]
[assembly: AssemblyVersion("1.29.0")]
[assembly: AssemblyFileVersion("1.29.0")] | using System.Reflection;
[assembly: AssemblyTitle("Fody")]
[assembly: AssemblyProduct("Fody")]
[assembly: AssemblyVersion("1.28.3")]
[assembly: AssemblyFileVersion("1.28.3")] | mit | C# |
4712769b42a749fae5e5d77adbd6e653490c7b2c | fix datetime localization formatting | haithemaraissia/monotouch-samples,davidrynn/monotouch-samples,xamarin/monotouch-samples,albertoms/monotouch-samples,haithemaraissia/monotouch-samples,a9upam/monotouch-samples,sakthivelnagarajan/monotouch-samples,peteryule/monotouch-samples,labdogg1003/monotouch-samples,YOTOV-LIMITED/monotouch-samples,labdogg1003/monoto... | WatchKit/WatchLocalization/WatchL10n_iOSWatchKitExtension/DetailController.cs | WatchKit/WatchLocalization/WatchL10n_iOSWatchKitExtension/DetailController.cs | using Foundation;
using System;
using System.CodeDom.Compiler;
using UIKit;
namespace WatchL10n_iOSWatchKitExtension
{
partial class DetailController : WatchKit.WKInterfaceController
{
public DetailController (IntPtr handle) : base (handle)
{
}
public override void WillActivate ()
{
base.WillActivate (... | using Foundation;
using System;
using System.CodeDom.Compiler;
using UIKit;
namespace WatchL10n_iOSWatchKitExtension
{
partial class DetailController : WatchKit.WKInterfaceController
{
public DetailController (IntPtr handle) : base (handle)
{
}
public override void WillActivate ()
{
base.WillActivate (... | mit | C# |
99fa4e1a00494a539f1e67dc574275f84b78e274 | Add Note model | jzebedee/lcapi | LCAPI/LCAPI/Models/Note.cs | LCAPI/LCAPI/Models/Note.cs | using System;
namespace LendingClub.Models
{
/// <summary>
/// Details of a note owned by the investor
/// </summary>
public class Note
{
public string LoanStatus { get; set; }
public long LoanId { get; set; }
public long NoteId { get; set; }
public string Gr... | agpl-3.0 | C# | |
cd6365e9745046c856be2b4edeac1f254392a76a | Create Base62CorrelationServiceTests.cs | tiksn/TIKSN-Framework | TIKSN.UnitTests.Shared/Integration/Correlation/Base62CorrelationServiceTests.cs | TIKSN.UnitTests.Shared/Integration/Correlation/Base62CorrelationServiceTests.cs | using FluentAssertions;
using Microsoft.Extensions.DependencyInjection;
using System;
using TIKSN.DependencyInjection;
using Xunit;
using Xunit.Abstractions;
namespace TIKSN.Integration.Correlation.Tests
{
public class Base62CorrelationServiceTests
{
private readonly ICorrelationService _correlationSe... | mit | C# | |
556b51b7245bd5a0225ae502689fb5904a328662 | Add Q228 | txchen/localleet | csharp/Q228_SummaryRanges.cs | csharp/Q228_SummaryRanges.cs | using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Xunit;
// Given a sorted integer array without duplicates, return the summary of its ranges.
//
// For example, given [0,1,2,4,5,7], return ["0->2","4->5","7"].
// https://leetcode.com/problems/summar... | mit | C# | |
f8402a851c16e57bf3d74b438c1eb291608d02d0 | Create MongoUnitOfWorkFactory.cs | tiksn/TIKSN-Framework | TIKSN.Core/Data/Mongo/MongoUnitOfWorkFactory.cs | TIKSN.Core/Data/Mongo/MongoUnitOfWorkFactory.cs | using System;
using System.Threading;
using System.Threading.Tasks;
using Microsoft.Extensions.DependencyInjection;
using MongoDB.Driver;
namespace TIKSN.Data.Mongo
{
public class MongoUnitOfWorkFactory : IMongoUnitOfWorkFactory
{
private readonly IMongoClientProvider _mongoClientProvider;
pri... | mit | C# | |
d630654f779ccd8d6e65ab1cb445076dc06e8154 | Add new NSNetService file to keep API compatibility with binding change | cwensley/maccore,mono/maccore | src/Foundation/NSNetService.cs | src/Foundation/NSNetService.cs | //
// Copyright 2012 Xamarin Inc
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
// "Software"), to deal in the Software without restriction, including
// without limitation the rights to use, copy, modify, merge, publish,
//... | apache-2.0 | C# |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.