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
[CmdletBinding()] | |
param ( | |
[string[]] | |
$ReferenceFrom, | |
[string] | |
$Assembly, | |
[string] | |
$TargetFrameworkVersion, |
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
using System; | |
using System.IO; | |
using System.Reflection; | |
using System.Runtime.Serialization; | |
using System.Text; | |
using System.Xml; | |
namespace NetDataContractSerializerTest | |
{ | |
class Program |
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
using System; | |
using System.Collections.Generic; | |
using System.IO; | |
using System.Runtime.Serialization; | |
using System.Text; | |
using System.Xml; | |
namespace DataContractSerializerTest | |
{ | |
class Program |
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
#include "stdafx.h" | |
#ifndef URASANDESU_CPPANONYM_CPPANONYMNOTIMPLEMENTEDEXCEPTION_H | |
#include <Urasandesu/CppAnonym/CppAnonymNotImplementedException.h> | |
#endif | |
#ifndef URASANDESU_CPPANONYM_CPPANONYMCOMEXCEPTION_H | |
#include <Urasandesu/CppAnonym/CppAnonymCOMException.h> | |
#endif |
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
namespace System | |
{ | |
public struct DateTime | |
{ | |
public static DateTime Now | |
{ | |
get | |
{ | |
// スタブでやっていたことの逆が挿入される。 | |
var holder = default(IndirectionHolder<IndirectionFunc<DateTime>>); |
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
namespace System | |
{ | |
public struct DateTime | |
{ | |
public static DateTime Now | |
{ | |
get | |
{ | |
return DateTime.UtcNow.ToLocalTime(); | |
} |
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
using NUnit.Framework; | |
using program1.MyLibrary; | |
using System; | |
using System.Prig; | |
using Urasandesu.Prig.Framework; | |
namespace Test.program1.MyLibraryTest | |
{ | |
[TestFixture] | |
public class LifeInfoTest |
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
using Urasandesu.Prig.Framework; | |
// IndirectableAttribute を使い、スタブに入れ替えたい Assembly にメタデータトークンを付与します。 | |
// このメタデータトークンですが、問題になっている DateTime.Now の getter メソッドは get_Now という | |
// 名前の静的メソッドですので、そのトークンである 0x060002D2 を指定します。 | |
// ※メタデータトークンは、対象の dll を ildasm 等で逆コンパイルしたり、MethodInfo.MetadataToken を | |
// 参照することによって確認することができます。 | |
[assembly: Indirectable(0x060002D2)] | |
namespace System.Prig |
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
using System; | |
namespace program1.MyLibrary | |
{ | |
public static class LifeInfo | |
{ | |
public static bool IsLunchBreak() | |
{ | |
var now = DateTime.Now; | |
return 12 <= now.Hour && now.Hour < 13; |
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
using System; | |
using System.Prig; | |
using Urasandesu.Prig.Framework; | |
namespace program1 | |
{ | |
class Program | |
{ | |
static void Main(string[] args) | |
{ |