This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class ObjectHierarchyManager { | |
//TBD: move custom settings to wrapper config object | |
private Map<String, Mapper_Object_Settings__c> dmlSettings; | |
private String mappingName; | |
public ObjectHierarchyManager(String mappingName) { | |
this.mappingName = mappingName; | |
fetchDmlSettings(); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@isTest | |
public class ObjectHierarchyManagerTest { | |
@isTest | |
private static void testBasicHierarchyInsert(){ | |
insertObjectMappingSettings(1); | |
Account acc = new Account(Name = 'Test'); | |
Account acc2 = new Account(Name = 'Test2'); | |
List<Contact> contactList = new List<Contact>{ | |
new Contact(LastName = 'Contact1'), |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//dotnet tool install gti -g | |
//payload | |
tools.gti | |
Id,Version,FeedUri | |
coverlet.console,1.5.0, | |
dotnet-cleanup,0.5.2, | |
dotnet-depends,0.3.0, | |
dotnet-doc,1.0.4, | |
dotnet-outdated,2.2.0, | |
dotnet-script,0.28.0, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using Strategy; | |
using System.Collections.Generic; | |
public class Program | |
{ | |
public static void Main() | |
{ | |
ILogReader logReader; | |
// log storage number one |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using TemlateMethod; | |
using System.Collections.Generic; | |
public class Program | |
{ | |
public static void Main() | |
{ | |
var items = new [] { 1, 2, 3, 4, 5 }; | |
AbstractClass processor = new ConcreteProcessor1(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Collections.Generic; | |
namespace Mediator { | |
/// <summary> | |
/// The 'Mediator' abstract class | |
/// </summary> | |
public abstract class AbstractChatroom { | |
public abstract void Register (User user); | |
public abstract void Send (string from, string to, string message); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Collections; | |
using System.Collections.Generic; | |
namespace Iterator { | |
public class ConcreteIterator<T> : Iterator.Iterator<T> { | |
public ConcreteIterator (CustomCollection<T> collection) { | |
_collection = collection; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Collections.Generic; | |
namespace Observer { | |
public class ConcreteObserver : Observer { | |
public string State { get; private set; } | |
public override void Update (Subject state) { | |
State = (state as ConcreteSubject).SubjectState; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using Visitor; | |
public class Program { | |
public static void Main () { | |
var baseEntry = new SimpleLogEntry () { | |
Created = DateTime.Now, | |
Message = "test" | |
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Collections.Generic; | |
namespace Command { | |
public class Calculator { | |
private int _curr = 0; | |
public int CurrentResult { get => _curr; set => _curr = value; } | |
public int Operate (char @operator, int operand) { |
OlderNewer