This file contains hidden or 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 LogAnalyzer { | |
private IExtensionManager manager; | |
public LogAnalyzer(IExtensionManager mgr) { | |
manager = mgr; | |
} | |
public bool isValidLogFileName(string fileName) { | |
return manager.isValid(fileName); | |
} | |
} |
This file contains hidden or 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 bool isValidLogFileName(string fileName) { | |
FileExtensionManager manager = new FileExtensionManager(); | |
return manager.isValid(fileName); | |
} | |
class FileExtensionManager { | |
public bool isValid(string fileName) { | |
//TODO: read some file here | |
} | |
} |
This file contains hidden or 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 HomeworkCentral { | |
private final Homework homework; | |
public HomeworkCentral(Homework homework) { | |
this.homework = homework; | |
} | |
void doHomework() { | |
homework.complete(); |
This file contains hidden or 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
private static IContainer MiddleCompany() | |
{ | |
ContainerBuilder builder = new ContainerBuilder(); | |
//在仲介公司裡寫需求人申請單 | |
builder.RegisterType<MineWithMiddle>(); | |
//小明所需打掃阿姨需求 | |
builder.RegisterType<Aunt>().As<ISwapable>(); | |
return builder.Build(); |
This file contains hidden or 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 Mine | |
{ | |
public Aunt aunt = new Aunt(); | |
public void Room() | |
{ | |
aunt.Swapping(); | |
} | |
} |
This file contains hidden or 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 Calculator | |
{ | |
public int Add(int x, int y) | |
{ | |
return x + y; | |
} | |
} | |
[TestClass] | |
public class UnitTest1 |
This file contains hidden or 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
[TestMethod] | |
public void Test_Charge_Customer_Count() | |
{ | |
//arrange | |
ICheckInFee stubCheckInFee = MockRepository.GenerateStub<ICheckInFee>(); | |
Pub target = new Pub(stubCheckInFee); | |
stubCheckInFee.Stub(x => x.GetFee(Arg<Customer>.Is.Anything)).Return(100); | |
var customers = new List<Customer> |
This file contains hidden or 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
hello.o: file format Mach-O 64-bit x86-64 | |
RELOCATION RECORDS FOR [__text]: | |
0000000000000068 X86_64_RELOC_BRANCH _func | |
0000000000000032 X86_64_RELOC_SIGNED _gy | |
000000000000002c X86_64_RELOC_SIGNED _gx | |
0000000000000018 X86_64_RELOC_SIGNED _gy | |
000000000000000f X86_64_RELOC_SIGNED _gx |
This file contains hidden or 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
cffa edfe 0700 0001 0300 0000 0100 0000 | |
0400 0000 0802 0000 0020 0000 0000 0000 | |
1900 0000 8801 0000 0000 0000 0000 0000 | |
0000 0000 0000 0000 0000 0000 0000 0000 | |
3001 0000 0000 0000 2802 0000 0000 0000 | |
3001 0000 0000 0000 0700 0000 0700 0000 | |
0400 0000 0000 0000 5f5f 7465 7874 0000 | |
0000 0000 0000 0000 5f5f 5445 5854 0000 | |
0000 0000 0000 0000 0000 0000 0000 0000 | |
7900 0000 0000 0000 2802 0000 0400 0000 |
This file contains hidden or 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
.section __TEXT,__text,regular,pure_instructions | |
.build_version macos, 10, 14 sdk_version 10, 14 | |
.globl _func ## -- Begin function func | |
.p2align 4, 0x90 | |
_func: ## @func | |
.cfi_startproc | |
## %bb.0: | |
pushq %rbp | |
.cfi_def_cfa_offset 16 | |
.cfi_offset %rbp, -16 |