Skip to content

Instantly share code, notes, and snippets.

@ortuagustin
ortuagustin / cloudSettings
Created Apr 22, 2019
Visual Studio Code Settings Sync Gist
View cloudSettings
{"lastUpload":"2019-04-22T15:10:56.813Z","extensionVersion":"v3.2.8"}
@ortuagustin
ortuagustin / cloudSettings
Last active Nov 13, 2019
Visual Studio Code Settings Sync Gist
View cloudSettings
{"lastUpload":"2019-11-13T18:54:21.315Z","extensionVersion":"v3.4.3"}
View Enum.Wrapper.pas
unit Enum.Wrapper;
interface
uses
System.SysUtils,
System.TypInfo;
type
EEnumOutOfRange = class(System.SysUtils.EArgumentOutOfRangeException);
View DateTimeHelper.Exceptions.pas
unit DateTimeHelper.Exceptions;
interface
uses
System.SysUtils;
type
{$REGION 'Exceptions'}
/// <summary> Ancestro base para todas las excepciones elevadas por TDateTimeHelper </summary>
View DateTimeHelper.pas
unit DateTimeHelper;
interface
uses
DateTimeHelper.Exceptions,
System.Types,
System.SysUtils,
System.DateUtils;
View EnumHelper.pas
unit EnumHelper;
interface
uses
System.SysUtils,
System.TypInfo,
System.Rtti;
type
@ortuagustin
ortuagustin / Test003.dpr
Created Jan 7, 2017 — forked from xcluster/Test003.dpr
Delphi / TFormAsInterface
View Test003.dpr
program Test003;
uses
FastMM4 in '..\..\..\VCL\FastMM4\FastMM4.pas',
FastMM4Messages in '..\..\..\VCL\FastMM4\FastMM4Messages.pas',
Vcl.Forms,
Unit1 in 'Unit1.pas' {Form1},
Unit2 in 'Unit2.pas' {Form2},
Unit3 in 'Unit3.pas';
View Program2.pas
TSomeClass = class
strict private type
IStrictPrivate = interface
['{4FBB71DA-2E34-470E-8A22-1DB3F7716252}']
end;
strict protected type
IStrictProtected = interface
['{14D38867-7A34-4556-BEBB-CF709FBBA6BC}']
end;
private type
View IntfMethodResolution.pas
IFoo = interface
['{4061C455-B122-48D6-940F-9C1B2FD4A689}']
end;
IDoesntWorkFactory = interface
['{E9A093ED-C429-46C3-82DD-D5D32EB9120F}']
function Create(const Blabla: string): IFoo; overload;
function Create(const Blabla: Integer): IFoo; overload;
end;
View SingletonService.pas
unit Service;
type
IService = interface
procedure DoServiceThing;
end;
TFactory<T> = reference to function: T;
unit ServiceImpl;