code stringlengths 15 88.6k | refined code stringlengths 1 74.8k | summary stringlengths 33 2.52k |
|---|---|---|
/*
* 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... |
using System;
using System.Collections.Generic;
using System.IO;
using System.Reflection;
using Nini.Config;
using log4net;
namespace OpenSim.Region.Physics.Manager
{
public class PhysicsPluginManager
{
private static readonly ILog Log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType... |
- Renamed `m_log` to `Log` to follow PascalCase convention for static readonly fields.
- Renamed private fields to follow the convention of leading underscore and camelCase.
- Extracted validation logic into `ValidateNames` method.
- Split the logic for getting mesh engine, voxel mesher, and physics scene into separat... |
using System;
using System.Collections.Generic;
using System.Text;
namespace Platform.VirtualFileSystem.Providers
{
public class JumpPointFile
: FileWrapper
{
public override INodeAddress Address
{
get
{
return this.address;
}
}
private INodeAddress address;
public JumpPoi... |
using System;
namespace Platform.VirtualFileSystem.Providers
{
public class JumpPointFile : FileWrapper
{
private readonly INodeAddress _address;
public override INodeAddress Address => _address;
public JumpPointFile(IFile file, INodeAddress address)
: base(file)
... |
- Renamed private field `address` to `_address` to follow the convention of using a leading underscore for private fields.
- Changed the getter of the `Address` property to use expression-bodied member syntax for conciseness.
- Removed unnecessary `using` directives (`System.Collections.Generic` and `System.Text`) as ... |
// Copyright © 2010 onwards, Andrew Whewell
// All rights reserved.
//
// Redistribution and use of this software in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
// * Redistributions of source code must retain the above copyright notice, this l... |
using System;
namespace VirtualRadar.Interface.Database
{
/// <summary>
/// Represents information from a single record in the DBInfo table of the BaseStation database.
/// </summary>
public class BaseStationDbInfo
{
/// <summary>
/// Gets or sets the version of the database before... |
- Renamed class from BaseStationDBInfo to BaseStationDbInfo to adhere to PascalCase convention.
- Updated XML comment for the class to be more descriptive.
- Updated XML comment for the CurrentVersion property to clarify it represents the current version.
|
using System;
using System.Text;
using System.Text.RegularExpressions;
using Platform.Text;
using Platform.Text.RegularExpressions;
namespace Platform.VirtualFileSystem
{
public static class NodeFilters
{
public static Predicate<INode> Any
{
get
{
return isAnyPredicate;
}
}
priv... |
using System;
using System.Text.RegularExpressions;
namespace Platform.VirtualFileSystem
{
public static class NodeFilters
{
public static Predicate<INode> Any => IsAnyPredicate;
private static readonly Predicate<INode> IsAnyPredicate = ByNodeType(NodeType.Any);
public static Predica... |
- Renamed properties and fields to follow PascalCase and camelCase conventions respectively.
- Removed unused imports.
- Simplified the check in `IsSimpleRegexNameFilter` method to use pattern matching.
- Ensured consistency in naming and structure throughout the code.
|
using System;
using SharpVectors.Dom.Views;
namespace SharpVectors.Dom.Events
{
/// <summary>
/// The <see cref="IMouseEvent">IMouseEvent</see> interface provides
/// specific contextual information associated with Mouse events.
/// </summary>
/// <remarks>
/// <para>
/// In the case of nested elements mouse ev... |
using System;
namespace SharpVectors.Dom.Events
{
/// <summary>
/// The <see cref="IMouseEvent"/> interface provides specific contextual information associated with Mouse events.
/// </summary>
/// <remarks>
/// <para>In the case of nested elements mouse events are always targeted at the most deep... |
- Removed the unused `using SharpVectors.Dom.Views;` directive as it is not referenced in the provided code.
- Ensured all property names follow PascalCase convention.
- Condensed remarks to improve readability without losing important information.
- Kept the method signatures intact as they were already following Pas... |
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using OpenCvSharp;
using SampleBase;
namespace CStyleSamplesCS
{
/// <summary>
/// Qt highgui test
/// </summary>
class QtTest
{
public QtTest()
{
using (CvWindow window = new CvWindow... |
using System;
using OpenCvSharp;
namespace CSharpSamples
{
public class QtHighGuiTest
{
public QtHighGuiTest()
{
using (CvWindow window = new CvWindow("Window", WindowMode.ExpandedGui))
using (IplImage image = new IplImage(FilePath.Image.Lenna, LoadMode.Color))
... |
- Renamed class from `QtTest` to `QtHighGuiTest` to better describe its purpose.
- Used PascalCase for method names and ensured they describe their functionality.
- Extracted repeated logic into separate methods (`AddTextToImage`, `DisplayOverlayAndStatusBar`, `CreateButtons`, `HandleButtonClick`, `CreateTrackbar`, `H... |
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Identity.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore;
using Demo.Models;
namespace Demo.Data
{
public class ApplicationDbContext : IdentityDbContext<ApplicationUser>
{
... |
using System;
using System.Collections.Generic;
using Microsoft.AspNetCore.Identity.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore;
using Demo.Models;
namespace Demo.Data
{
public class ApplicationDbContext : IdentityDbContext<ApplicationUser>
{
public ApplicationDbContext(DbContextOptions<A... |
- Removed unused `System.Linq` import.
- Ensured method and class names adhere to PascalCase convention.
- No other changes were necessary as the code was already quite clean and followed most principles.
|
using Machine.Specifications;
using Rhino.Mocks;
namespace UndefeatedTicTacToe.Specs.BotSpecs
{
[Subject("Move Strategy")]
public class when_the_bot_has_two_horizontal_in_a_row : MoveStrategyContext
{
Establish context = () =>
{
_game.TestableBoard[0, 1] = _bot;
_game.TestableBoard[2, 2] = _opponent;
... |
using Machine.Specifications;
using Rhino.Mocks;
namespace UndefeatedTicTacToe.Specs.BotSpecs
{
[Subject("Move Strategy")]
public class WhenTheBotHasTwoHorizontalInARow : MoveStrategyContext
{
Establish context = () =>
{
_game.TestableBoard[0, 1] = _bot;
_game.Testa... |
- Renamed classes to use PascalCase and more descriptive names.
- Renamed methods to use PascalCase and more descriptive names.
- Removed unnecessary comments and ensured code clarity.
|
using System;
using System.IO;
using NUnit.Framework;
using RestFiles.ServiceModel;
using ServiceStack;
/* For syntax highlighting and better readability of this file, view it on GitHub:
* https://github.com/ServiceStack/ServiceStack.Examples/blob/master/src/RestFiles/RestFiles.Tests/SyncRestClientTests.cs
*/
names... |
using System;
using System.IO;
using NUnit.Framework;
using RestFiles.ServiceModel;
using ServiceStack;
namespace RestFiles.Tests
{
/// <summary>
/// These tests demonstrate how to call ServiceStack REST web services synchronously using an IRestClient.
///
/// Synchronous IO calls are the most famili... |
- Renamed `TextFixtureSetUp` to `SetupFixture` and `TestFixtureTearDown` to `TeardownFixture` for clarity.
- Renamed `OnBeforeEachTest` to `SetupEachTest` for clarity.
- Renamed `CreateRestClient` to `CreateRestClient` (no change needed, but ensured consistency).
- Renamed test methods to follow PascalCase and clearly... |
// Copyright (c) MOSA Project. Licensed under the New BSD License.
using Mosa.Compiler.Framework;
using System;
using System.Diagnostics;
namespace Mosa.Platform.x86.Instructions
{
/// <summary>
/// Representations the x86 cmp instruction.
/// </summary>
public sealed class Cmp : X86Instruction
{
#region Data... |
using Mosa.Compiler.Framework;
using System.Diagnostics;
namespace Mosa.Platform.x86.Instructions
{
/// <summary>
/// Represents the x86 cmp instruction.
/// </summary>
public sealed class Compare : X86Instruction
{
#region Data Members
private static readonly OpCode MemoryRegiste... |
- Renamed class from `Cmp` to `Compare` for clarity.
- Renamed data member region from `Data Member` to `Data Members`.
- Renamed opcode constants to more descriptive names.
- Split the `ComputeOpCode` method into smaller methods (`GetMemoryRegisterOpCode`, `GetRegisterMemoryOpCode`, `GetRegisterConstantOpCode`) to ad... |
using System.Linq;
using Orchard;
using Orchard.DisplayManagement.Descriptors;
using Orchard.Environment.Extensions;
using Orchard.UI.Resources;
using CloudBust.Resources.Services;
using Orchard.Environment;
using Orchard.UI.Admin;
namespace CloudBust.Resources.Shapes
{
[OrchardFeature("CloudBust.Resources.Notif... |
using Orchard;
using Orchard.DisplayManagement.Descriptors;
using Orchard.Environment.Extensions;
using Orchard.UI.Resources;
using CloudBust.Resources.Services;
using Orchard.Environment;
using Orchard.UI.Admin;
namespace CloudBust.Resources.Shapes
{
[OrchardFeature("CloudBust.Resources.Notify")]
public clas... |
- Renamed method `shapeDisplayingContext` to `context` for clarity.
- Extracted the logic for determining whether the Notify script should be injected into a separate method `ShouldInjectNotifyScript` to improve modularity and readability.
- Replaced `FirstOrDefault` with `Any` for checking the existence of the Notify... |
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using WATF.Core.WebControls;
namespace WATF.Core.Page
{
public class Page : IPage
{
#region "Constructors, fields"
private mshtml.IHTMLDocument2 m_htmlDocument = null;
public Page(mshtml.IHTMLDocument... |
using System;
using System.Collections.Generic;
using WATF.Core.WebControls;
namespace WATF.Core.Page
{
public class HtmlPage : IPage
{
private readonly mshtml.IHTMLDocument2 _htmlDocument;
public HtmlPage(mshtml.IHTMLDocument2 document)
{
_htmlDocument = document;
... |
- Renamed class from `Page` to `HtmlPage` to better reflect its purpose.
- Renamed private field `m_htmlDocument` to `_htmlDocument` following camelCase convention with leading underscore.
- Changed method `WaitForReadyPage` to `WaitForPageToLoad` to better describe its functionality.
- Renamed properties `Document1`,... |
// *****************************************************************************
//
// © Component Factory Pty Ltd 2012. All rights reserved.
// The software and associated documentation supplied hereunder are the
// proprietary information of Component Factory Pty Ltd, 17/267 Nepean Hwy,
// Seaford, Vic 3198, A... |
using System;
using System.Drawing;
using System.Windows.Forms;
using System.Diagnostics;
namespace ComponentFactory.Krypton.Toolkit
{
internal class ViewDrawMenuImageCanvas : ViewDrawCanvas, IContextMenuItemColumn
{
#region Instance Fields
private readonly int _columnIndex;
private Si... |
- Renamed the method `GetPreferredSize` to follow the convention of describing what the method does.
- Used expression-bodied members for properties `ColumnIndex`, `LastPreferredSize`, and `OverridePreferredWidth` where applicable.
- Removed redundant validation checks for `context` being null in the `Layout` and `Ren... |
/**********************************************************************************************************************
* Send.NET (https://github.com/mkloubert/SendNET) *
* ... |
using MarcelJoachimKloubert.SendNET.Extensions;
using System;
using System.Collections.Generic;
using System.Net;
using System.Net.Sockets;
namespace MarcelJoachimKloubert.SendNET
{
/// <summary>
/// Represents a remote connection.
/// </summary>
public class RemoteConnection : DisposableBase, IRemote... |
- Renamed `appContext` to `applicationContext` for consistency and clarity.
- Renamed `Socket` to `SocketInstance` to avoid confusion with the `Socket` class.
- Renamed `_SYNC` to `_sync` to follow camelCase naming convention for private fields.
- Simplified the `ConnectTo` method that takes an `IEnumerable<char>` for... |
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: Odometry.proto
#pragma warning disable 1591, 0612, 3021
#region Designer generated code
using pb = global::Google.Protobuf;
using pbc = global::Google.Protobuf.Collections;
using pbr = global::Google.Protobuf.Reflection;
using scg = global::System.... |
using Google.Protobuf;
using Google.Protobuf.Collections;
using Google.Protobuf.Reflection;
using System.Collections.Generic;
/// <summary>Holder for reflection information generated from Odometry.proto</summary>
public static partial class OdometryReflection
{
#region Descriptor
/// <summary>File descriptor ... |
- Removed unused imports and commented-out code.
- Renamed private fields to use a leading underscore and camelCase.
- Ensured consistent use of PascalCase for public properties and method names.
- Simplified some code blocks for better readability.
- Added XML documentation comments for better understanding of the co... |
namespace ACT.SpecialSpellTimer
{
using System.Collections.Generic;
using System.Media;
using System.Text.RegularExpressions;
using ACT.SpecialSpellTimer.Utility;
/// <summary>
/// テキストコマンド Controller
/// </summary>
public static class TextCommandController
{
/// <summary>... |
using System.Collections.Generic;
using System.Media;
using System.Text.RegularExpressions;
using ACT.SpecialSpellTimer.Utility;
namespace ACT.SpecialSpellTimer
{
/// <summary>
/// Controller for text commands
/// </summary>
public static class TextCommandController
{
/// <summary>
... |
- Renamed class and method names to follow PascalCase convention.
- Split the large `MatchCommand` method into smaller, more focused methods (`HandleAnalyzeCommand`, `HandleRefreshCommand`, etc.) to improve modularity and adhere to the Single Responsibility Principle.
- Used `StringComparison.OrdinalIgnoreCase` for st... |
End of preview. Expand in Data Studio
README.md exists but content is empty.
- Downloads last month
- 6