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 |
|---|---|---|---|---|---|---|---|---|
497a12c78f98a3cc360099748bfc64736fc0a056 | Comment fix. | dlemstra/Magick.NET,dlemstra/Magick.NET | Source/Magick.NET/Shared/Defines/ReadDefinesCreator.cs | Source/Magick.NET/Shared/Defines/ReadDefinesCreator.cs | // Copyright 2013-2019 Dirk Lemstra <https://github.com/dlemstra/Magick.NET/>
//
// Licensed under the ImageMagick License (the "License"); you may not use this file except in
// compliance with the License. You may obtain a copy of the License at
//
// https://www.imagemagick.org/script/license.php
//
// Unless required by applicable law or agreed to in writing, software distributed under the
// License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
// either express or implied. See the License for the specific language governing permissions
// and limitations under the License.
namespace ImageMagick.Defines
{
/// <summary>
/// Base class that can create read defines.
/// </summary>
public abstract class ReadDefinesCreator : DefinesCreator, IReadDefines
{
/// <summary>
/// Initializes a new instance of the <see cref="ReadDefinesCreator"/> class.
/// </summary>
/// <param name="format">The format where the defines are for.</param>
protected ReadDefinesCreator(MagickFormat format)
: base(format)
{
}
}
} | // Copyright 2013-2019 Dirk Lemstra <https://github.com/dlemstra/Magick.NET/>
//
// Licensed under the ImageMagick License (the "License"); you may not use this file except in
// compliance with the License. You may obtain a copy of the License at
//
// https://www.imagemagick.org/script/license.php
//
// Unless required by applicable law or agreed to in writing, software distributed under the
// License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
// either express or implied. See the License for the specific language governing permissions
// and limitations under the License.
namespace ImageMagick.Defines
{
/// <summary>
/// Base class that can create write defines.
/// </summary>
public abstract class ReadDefinesCreator : DefinesCreator, IReadDefines
{
/// <summary>
/// Initializes a new instance of the <see cref="ReadDefinesCreator"/> class.
/// </summary>
/// <param name="format">The format where the defines are for.</param>
protected ReadDefinesCreator(MagickFormat format)
: base(format)
{
}
}
} | apache-2.0 | C# |
cbce9c97a4fb237899556aa2fa152a5f446afce4 | Add humanise to encType | GiscardBiamby/NancyContrib.Chameleon,VegasoftTI/ChameleonForms,VegasoftTI/ChameleonForms,GiscardBiamby/NancyContrib.Chameleon,VegasoftTI/ChameleonForms | ChameleonForms/Templates/HtmlHelperExtensions.cs | ChameleonForms/Templates/HtmlHelperExtensions.cs | using System.Collections.Generic;
using System.Net.Http;
using System.Web;
using System.Web.Mvc;
using ChameleonForms.Enums;
using Humanizer;
namespace ChameleonForms.Templates
{
public static class Html
{
public static IHtmlString Attribute(string name, string value)
{
if (value == null)
return new HtmlString(string.Empty);
//Todo: encode the values here
return new HtmlString(string.Format(" {0}=\"{1}\"", name, value));
}
public static IHtmlString BuildFormTag(string action, FormMethod method, object htmlAttributes = null, EncType? encType = null)
{
var tagBuilder = new TagBuilder("form");
tagBuilder.MergeAttributes(HtmlHelper.AnonymousObjectToHtmlAttributes(htmlAttributes));
tagBuilder.MergeAttribute("action", action);
tagBuilder.MergeAttribute("method", HtmlHelper.GetFormMethodString(method), true);
if (encType.HasValue)
{
tagBuilder.MergeAttribute("enctype", encType.Humanize());
}
return new HtmlString(tagBuilder.ToString(TagRenderMode.StartTag));
}
}
}
| using System.Collections.Generic;
using System.Net.Http;
using System.Web;
using System.Web.Mvc;
namespace ChameleonForms.Templates
{
public static class Html
{
public static IHtmlString Attribute(string name, string value)
{
if (value == null)
return new HtmlString(string.Empty);
//Todo: encode the values here
return new HtmlString(string.Format(" {0}=\"{1}\"", name, value));
}
public static IHtmlString BuildFormTag(string action, FormMethod method, object htmlAttributes = null, string encType = null)
{
var tagBuilder = new TagBuilder("form");
tagBuilder.MergeAttributes(HtmlHelper.AnonymousObjectToHtmlAttributes(htmlAttributes));
tagBuilder.MergeAttribute("action", action);
tagBuilder.MergeAttribute("method", HtmlHelper.GetFormMethodString(method), true);
if (!string.IsNullOrEmpty(encType))
{
tagBuilder.MergeAttribute("enctype", encType.Humanize());
}
return new HtmlString(tagBuilder.ToString(TagRenderMode.StartTag));
}
}
}
| mit | C# |
77e258d0734ee728191a9ee1aaf228f4350ef7c1 | Use of 'var'. | philjones/nquant,drewnoakes/nquant | nQuant.Core/WuQuantizer.cs | nQuant.Core/WuQuantizer.cs | using System.Collections.Generic;
using System.Drawing;
using System.Drawing.Imaging;
namespace nQuant
{
public class WuQuantizer : WuQuantizerBase, IWuQuantizer
{
private static IEnumerable<byte[]> IndexedPixels(ImageBuffer image, Pixel[] lookups, int alphaThreshold, PaletteColorHistory[] paletteHistogram)
{
var lineIndexes = new byte[image.Image.Width];
var lookup = new PaletteLookup(lookups);
foreach (var pixelLine in image.PixelLines)
{
for (int pixelIndex = 0; pixelIndex < pixelLine.Length; pixelIndex++)
{
Pixel pixel = pixelLine[pixelIndex];
byte bestMatch = AlphaColor;
if (pixel.Alpha > alphaThreshold)
{
bestMatch = lookup.GetPaletteIndex(pixel);
paletteHistogram[bestMatch].AddPixel(pixel);
}
lineIndexes[pixelIndex] = bestMatch;
}
yield return lineIndexes;
}
}
internal override Image GetQuantizedImage(ImageBuffer image, int colorCount, Pixel[] lookups, int alphaThreshold)
{
var result = new Bitmap(image.Image.Width, image.Image.Height, PixelFormat.Format8bppIndexed);
var resultBuffer = new ImageBuffer(result);
var paletteHistogram = new PaletteColorHistory[colorCount + 1];
resultBuffer.UpdatePixelIndexes(IndexedPixels(image, lookups, alphaThreshold, paletteHistogram));
result.Palette = BuildPalette(result.Palette, paletteHistogram);
return result;
}
private static ColorPalette BuildPalette(ColorPalette palette, PaletteColorHistory[] paletteHistogram)
{
for (int paletteColorIndex = 0; paletteColorIndex < paletteHistogram.Length; paletteColorIndex++)
{
palette.Entries[paletteColorIndex] = paletteHistogram[paletteColorIndex].ToNormalizedColor();
}
return palette;
}
}
}
| using System.Collections.Generic;
using System.Drawing;
using System.Drawing.Imaging;
namespace nQuant
{
public class WuQuantizer : WuQuantizerBase, IWuQuantizer
{
private static IEnumerable<byte[]> IndexedPixels(ImageBuffer image, Pixel[] lookups, int alphaThreshold, PaletteColorHistory[] paletteHistogram)
{
var lineIndexes = new byte[image.Image.Width];
PaletteLookup lookup = new PaletteLookup(lookups);
foreach (var pixelLine in image.PixelLines)
{
for (int pixelIndex = 0; pixelIndex < pixelLine.Length; pixelIndex++)
{
Pixel pixel = pixelLine[pixelIndex];
byte bestMatch = AlphaColor;
if (pixel.Alpha > alphaThreshold)
{
bestMatch = lookup.GetPaletteIndex(pixel);
paletteHistogram[bestMatch].AddPixel(pixel);
}
lineIndexes[pixelIndex] = bestMatch;
}
yield return lineIndexes;
}
}
internal override Image GetQuantizedImage(ImageBuffer image, int colorCount, Pixel[] lookups, int alphaThreshold)
{
var result = new Bitmap(image.Image.Width, image.Image.Height, PixelFormat.Format8bppIndexed);
var resultBuffer = new ImageBuffer(result);
var paletteHistogram = new PaletteColorHistory[colorCount + 1];
resultBuffer.UpdatePixelIndexes(IndexedPixels(image, lookups, alphaThreshold, paletteHistogram));
result.Palette = BuildPalette(result.Palette, paletteHistogram);
return result;
}
private static ColorPalette BuildPalette(ColorPalette palette, PaletteColorHistory[] paletteHistogram)
{
for (int paletteColorIndex = 0; paletteColorIndex < paletteHistogram.Length; paletteColorIndex++)
{
palette.Entries[paletteColorIndex] = paletteHistogram[paletteColorIndex].ToNormalizedColor();
}
return palette;
}
}
}
| apache-2.0 | C# |
e94bc03e86b2c50af6519de9134610a54e7ea706 | make MessageAndError members public so that we can build consumers that are not event-driven | MrGlenThomas/confluent-kafka-dotnet,bjornicus/confluent-kafka-dotnet,treziac/confluent-kafka-dotnet,ah-/rdkafka-dotnet,MrGlenThomas/confluent-kafka-dotnet,treziac/confluent-kafka-dotnet,bjornicus/confluent-kafka-dotnet,MaximGurschi/rdkafka-dotnet | src/RdKafka/Message.cs | src/RdKafka/Message.cs | namespace RdKafka
{
public struct Message
{
public string Topic { get; set; }
public int Partition { get; set; }
public long Offset { get; set; }
public byte[] Payload { get; set; }
public byte[] Key { get; set; }
public TopicPartitionOffset TopicPartitionOffset =>
new TopicPartitionOffset()
{
Topic = Topic,
Partition = Partition,
Offset = Offset
};
}
public struct MessageAndError
{
public Message Message;
public ErrorCode Error;
}
}
| namespace RdKafka
{
public struct Message
{
public string Topic { get; set; }
public int Partition { get; set; }
public long Offset { get; set; }
public byte[] Payload { get; set; }
public byte[] Key { get; set; }
public TopicPartitionOffset TopicPartitionOffset =>
new TopicPartitionOffset()
{
Topic = Topic,
Partition = Partition,
Offset = Offset
};
}
public struct MessageAndError
{
internal Message Message;
internal ErrorCode Error;
}
}
| apache-2.0 | C# |
512edcd02ebfad7e37e49f805325df1687077aff | Sort properties vs. methods; whitespace. | brendanjbaker/StraightSQL | src/StraightSql/IReader.cs | src/StraightSql/IReader.cs | namespace StraightSql
{
using System;
using System.Data.Common;
public interface IReader
{
Type Type { get; }
Object Read(DbDataReader reader);
}
}
| namespace StraightSql
{
using System;
using System.Data.Common;
public interface IReader
{
Object Read(DbDataReader reader);
Type Type { get; }
}
}
| mit | C# |
bf651c68ade0a5aedd742cf63e4f81a662147e0c | Fix font scaling when two monitors are scaled differently (BL-10981) | gmartin7/myBloomFork,BloomBooks/BloomDesktop,BloomBooks/BloomDesktop,BloomBooks/BloomDesktop,StephenMcConnel/BloomDesktop,StephenMcConnel/BloomDesktop,gmartin7/myBloomFork,BloomBooks/BloomDesktop,BloomBooks/BloomDesktop,gmartin7/myBloomFork,StephenMcConnel/BloomDesktop,StephenMcConnel/BloomDesktop,gmartin7/myBloomFork,StephenMcConnel/BloomDesktop,gmartin7/myBloomFork,BloomBooks/BloomDesktop,StephenMcConnel/BloomDesktop,gmartin7/myBloomFork | src/BloomExe/Properties/AssemblyInfo.cs | src/BloomExe/Properties/AssemblyInfo.cs | using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("Bloom")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("SIL")]
[assembly: AssemblyProduct("Bloom")]
[assembly: AssemblyCopyright("© SIL International 2012-2020")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
// Setting ComVisible to false makes the types in this assembly not visible
// to COM components. If you need to access a type in this assembly from
// COM, set the ComVisible attribute to true on that type.
[assembly: ComVisible(false)]
// The following GUID is for the ID of the typelib if this project is exposed to COM
[assembly: Guid("0afa7c29-4107-47a8-88cc-c15cb769f35e")]
// Version information for an assembly consists of the following four values:
//
// Major Version
// Minor Version
// Build Number
// Revision
//
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// Note that an automated process updates these in the TeamCity build; these ones however are important
// for whether a local build satisfies BloomParseClient.GetIsThisVersionAllowedToUpload.
// [assembly: AssemblyVersion("0.9.999.0")]
[assembly: AssemblyVersion("5.1.000.0")]
[assembly: AssemblyFileVersion("5.1.000.0")]
[assembly: AssemblyInformationalVersion("5.1.000.0")]
[assembly: InternalsVisibleTo("BloomTests")]
[assembly: InternalsVisibleTo("BloomHarvester")]
[assembly: InternalsVisibleTo("BloomHarvesterTests")]
[assembly: AssemblyMetadata("SquirrelAwareVersion", "1")]
// Without explicitly disabling DPI awareness here, the subsequent
// loading of some System.Windows.Media components will cause the
// application to change from DPI "Unaware" to DPI "System Aware".
// The one place we know this happens currently is when loading font metadata.
// This causes problems when one monitor is set to different font scaling than another.
// Depending on how far the UI has gotten in setting up when the awareness status changes,
// it will either result in inconsistent font/icon sizing or the whole
// window will shrink down. See BL-10981.
[assembly: System.Windows.Media.DisableDpiAwareness]
| using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("Bloom")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("SIL")]
[assembly: AssemblyProduct("Bloom")]
[assembly: AssemblyCopyright("© SIL International 2012-2020")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
// Setting ComVisible to false makes the types in this assembly not visible
// to COM components. If you need to access a type in this assembly from
// COM, set the ComVisible attribute to true on that type.
[assembly: ComVisible(false)]
// The following GUID is for the ID of the typelib if this project is exposed to COM
[assembly: Guid("0afa7c29-4107-47a8-88cc-c15cb769f35e")]
// Version information for an assembly consists of the following four values:
//
// Major Version
// Minor Version
// Build Number
// Revision
//
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// Note that an automated process updates these in the TeamCity build; these ones however are important
// for whether a local build satisfies BloomParseClient.GetIsThisVersionAllowedToUpload.
// [assembly: AssemblyVersion("0.9.999.0")]
[assembly: AssemblyVersion("5.1.000.0")]
[assembly: AssemblyFileVersion("5.1.000.0")]
[assembly: AssemblyInformationalVersion("5.1.000.0")]
[assembly: InternalsVisibleTo("BloomTests")]
[assembly: InternalsVisibleTo("BloomHarvester")]
[assembly: InternalsVisibleTo("BloomHarvesterTests")]
[assembly: AssemblyMetadata("SquirrelAwareVersion", "1")]
| mit | C# |
7fee8315479244700e46374b28bad668561e2379 | Add NotImplemented.ActiveIssue() method. (#3752) | krytarowski/corert,krytarowski/corert,gregkalapos/corert,yizhang82/corert,yizhang82/corert,shrah/corert,krytarowski/corert,yizhang82/corert,shrah/corert,shrah/corert,shrah/corert,yizhang82/corert,krytarowski/corert,gregkalapos/corert,gregkalapos/corert,gregkalapos/corert | src/Common/src/System/NotImplemented.cs | src/Common/src/System/NotImplemented.cs | // Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
namespace System
{
//
// Support for tooling-friendly NotImplementedExceptions.
//
internal static class NotImplemented
{
/// <summary>
/// Permanent NotImplementedException with no message shown to user.
/// </summary>
internal static Exception ByDesign
{
get
{
return new NotImplementedException();
}
}
/// <summary>
/// Permanent NotImplementedException with localized message shown to user.
/// </summary>
internal static Exception ByDesignWithMessage(string message)
{
return new NotImplementedException(message);
}
/// <summary>
/// Temporary NotImplementedException with no message shown to user.
/// Example: Exception.ActiveIssue("https://github.com/dotnet/corert/issues/xxxx") or Exception.ActiveIssue("TFS xxxxxx").
/// </summary>
internal static Exception ActiveIssue(string issue)
{
return new NotImplementedException();
}
}
}
| // Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
namespace System
{
//
// This simple class enables one to throw a NotImplementedException using the following
// idiom:
//
// throw NotImplemented.ByDesign;
//
// Used by methods whose intended implementation is to throw a NotImplementedException (typically
// virtual methods in public abstract classes that intended to be subclassed by third parties.)
//
// This makes it distinguishable both from human eyes and CCI from NYI's that truly represent undone work.
//
internal static class NotImplemented
{
internal static Exception ByDesign
{
get
{
return new NotImplementedException();
}
}
internal static Exception ByDesignWithMessage(String message)
{
return new NotImplementedException(message);
}
}
}
| mit | C# |
99bb4548db7755c4f3982948147b8f9b66d133c3 | Add using lines and namespaces | planetpowershell/planetpowershell,planetpowershell/planetpowershell,planetpowershell/planetpowershell,planetpowershell/planetpowershell | src/Firehose.Web/Authors/ShaneONeill.cs | src/Firehose.Web/Authors/ShaneONeill.cs | using System;
using System.Collections.Generic;
using System.Linq;
using System.ServiceModel.Syndication;
using System.Web;
using Firehose.Web.Infrastructure;
namespace Firehose.Web.Authors
{
public class ShaneONeill : IAmACommunityMember, IFilterMyBlogPosts
{
public string FirstName => "Shane";
public string LastName => "O'Neill";
public string ShortBioOrTagLine => "DBA. Food, Coffee, Whiskey (not necessarily in that order)... ";
public string StateOrRegion => "Ireland";
public string EmailAddress => string.Empty;
public string TwitterHandle => "SOZDBA";
public string GravatarHash => "0440d5d8f1b51b4765e3d48aec441510";
public string GitHubHandle => "shaneis";
public GeoPosition Position => new GeoPosition(53.2707, 9.0568);
public Uri WebSite => new Uri("https://nocolumnname.blog/");
public IEnumerable<Uri> FeedUris { get { yield return new Uri("https://nocolumnname.blog/feed/"); } }
public bool Filter(SyndicationItem item)
{
// This filters out only the posts that have the "PowerShell" category
return item.Categories.Any(c => c.Name.ToLowerInvariant().Equals("powershell"));
}
}
}
| public class ShaneONeill : IAmACommunityMember, IFilterMyBlogPosts
{
public string FirstName => "Shane";
public string LastName => "O'Neill";
public string ShortBioOrTagLine => "DBA. Food, Coffee, Whiskey (not necessarily in that order)... ";
public string StateOrRegion => "Ireland";
public string EmailAddress => string.Empty;
public string TwitterHandle => "SOZDBA";
public string GravatarHash => "0440d5d8f1b51b4765e3d48aec441510";
public string GitHubHandle => "shaneis";
public GeoPosition Position => new GeoPosition(53.2707, 9.0568);
public Uri WebSite => new Uri("https://nocolumnname.blog/");
public IEnumerable<Uri> FeedUris { get { yield return new Uri("https://nocolumnname.blog/feed/"); } }
public bool Filter(SyndicationItem item)
{
// This filters out only the posts that have the "PowerShell" category
return item.Categories.Any(c => c.Name.ToLowerInvariant().Equals("powershell"));
}
}
| mit | C# |
3ca0d5a660b483a8e503b42d7becebc69afb25e2 | Fix bugs in Map | jdno/AIChallengeFramework | Map/Map.cs | Map/Map.cs | //
// Copyright 2014 jdno
//
// 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 writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
using System;
using System.Collections.Generic;
namespace AIChallengeFramework
{
/// <summary>
/// A map is the top-level organizational unit of the gaming board. It contains
/// of several continents.
/// </summary>
public class Map
{
/// <summary>
/// A map consists of several continents.
/// </summary>
/// <value>The continents.</value>
public List<Continent> Continents { get; private set; }
/// <summary>
/// Dictionary for fast lookup of regions on this map using their ID.
/// </summary>
/// <value>The regions.</value>
public Dictionary<int, Region> Regions { get; private set; }
public Map ()
{
Continents = new List<Continent> ();
Regions = new Dictionary<int, Region> ();
Logger.Info ("Map:\tInitialized.");
}
/// <summary>
/// Adds the continent to the map.
/// </summary>
/// <param name="continent">Continent.</param>
public void AddContinent (Continent continent)
{
if (!Continents.Contains (continent)) {
Continents.Add (continent);
foreach (Region r in continent.Regions) {
AddRegion (r);
}
}
if (Logger.IsDebug ()) {
Logger.Debug (string.Format("Map:\tContinent {0} added.", continent.Id));
}
}
/// <summary>
/// Adds the region to the map.
/// </summary>
/// <param name="region">Region.</param>
public void AddRegion (Region region)
{
if (!Regions.ContainsKey (region.Id)) {
Regions.Add (region.Id, region);
AddContinent (region.Continent);
if (Logger.IsDebug ()) {
Logger.Debug (string.Format("Map:\tRegion {0} added.", region.Id));
}
}
}
/// <summary>
/// Return the continent with the given identifier.
/// </summary>
/// <returns>The continent with the given identifier.</returns>
/// <param name="id">Identifier.</param>
public Continent ContinentForId (int id)
{
foreach (Continent c in Continents) {
if (c.Id == id) {
return c;
}
}
return null;
}
}
}
| //
// Copyright 2014 jdno
//
// 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 writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
using System;
using System.Collections.Generic;
namespace AIChallengeFramework
{
/// <summary>
/// A map is the top-level organizational unit of the gaming board. It contains
/// of several continents.
/// </summary>
public class Map
{
/// <summary>
/// A map consists of several continents.
/// </summary>
/// <value>The continents.</value>
public List<Continent> Continents { get; private set; }
/// <summary>
/// Dictionary for fast lookup of regions on this map using their ID.
/// </summary>
/// <value>The regions.</value>
public Dictionary<int, Region> Regions { get; private set; }
public Map ()
{
Continents = new List<Continent> ();
Regions = new Dictionary<int, Region> ();
Logger.Info ("Map:\tInitialized.");
}
/// <summary>
/// Adds the continent to the map.
/// </summary>
/// <param name="continent">Continent.</param>
public void AddContinent (Continent continent)
{
if (!Continents.Contains (continent)) {
Continents.Add (continent);
}
if (Logger.IsDebug ()) {
Logger.Debug (string.Format("Map:\tContinent {0} added.", continent.Id));
}
}
/// <summary>
/// Adds the region to the map.
/// </summary>
/// <param name="region">Region.</param>
public void AddRegion (Region region)
{
Regions.Add (region.Id, region);
if (Logger.IsDebug ()) {
Logger.Debug (string.Format("Map:\tRegion {0} added.", region.Id));
}
}
/// <summary>
/// Return the continent with the given identifier.
/// </summary>
/// <returns>The continent with the given identifier.</returns>
/// <param name="id">Identifier.</param>
public Continent ContinentForId (int id)
{
foreach (Continent c in Continents) {
if (c.Id == id) {
return c;
}
}
return null;
}
}
}
| apache-2.0 | C# |
cd2ee30be00d7c5c998bc99616c1208c6a90d56a | Update version to 4.3.14 | MarimerLLC/cslacontrib,tfreitasleal/cslacontrib,tfreitasleal/cslacontrib,MarimerLLC/cslacontrib,MarimerLLC/cslacontrib,tfreitasleal/cslacontrib,MarimerLLC/cslacontrib | trunk/Source/GlobalAssemblyInfo.cs | trunk/Source/GlobalAssemblyInfo.cs | using System.Reflection;
using System.Runtime.InteropServices;
[assembly: AssemblyCompany("CslaContrib project")]
[assembly: AssemblyCopyright("Copyright CslaContrib 2009-2013")]
[assembly: AssemblyTrademark("")]
[assembly: ComVisible(false)]
[assembly: AssemblyVersion("4.3.14.0")]
[assembly: AssemblyFileVersion("4.3.14.0")]
| using System.Reflection;
using System.Runtime.InteropServices;
[assembly: AssemblyCompany("CslaContrib project")]
[assembly: AssemblyCopyright("Copyright CslaContrib 2009-2012")]
[assembly: AssemblyTrademark("")]
[assembly: ComVisible(false)]
[assembly: AssemblyVersion("4.3.13.0")]
[assembly: AssemblyFileVersion("4.3.13.0")]
| mit | C# |
7cb10ca3fd2f02f7db837844692eaeeca71ca9f9 | Add new file userAuth.cpl/Droid/MainActivity.cs | ArcanaMagus/userAuth.cpl,ArcanaMagus/userAuth.cpl,ArcanaMagus/userAuth.cpl,ArcanaMagus/userAuth.cpl | userAuth.cpl/Droid/MainActivity.cs | userAuth.cpl/Droid/MainActivity.cs | �
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Android.App;
using Android.Content;
using Android.OS;
using Android.Runtime;
using Android.Views;
using Android.Widget;
namespace userAuth.cpl.Droid
{
[Activity (Label = "userAuth.cpl.Droid", Icon = "@drawable/icon", MainLauncher = true, ConfigurationChanges = Android.Content.PM.ConfigChanges.Density | Android.Content.PM.ConfigChanges.Touchscreen)]
public class MainActivity : global::Xamarin.Forms.Platform.Android.ActivityIndicatorRenderer
{
protected override void OnCreate (Bundle bundle)
{
base.OnCreate (bundle);
global::Xamarin.Forms.Forms.Init (this, bundle);
LoadApplication (new App ());
// Create your apponlication here
}
}
namespace
}
|