/07_02.ps1 Secret
Last active
August 29, 2015 14:09
07. 移行サンプル:Telerik JustMock によるモック化③… で解説する間接スタブ設定取得コマンド。
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
PS> $pwd | |
Path | |
---- | |
C:\Users\Akira\Documents\Visual Studio 2013\Projects\JustMockMigrationDemo\StaticMockingMigration\bin\Debug | |
PS> powershell | |
Windows PowerShell | |
Copyright (C) 2013 Microsoft Corporation. All rights reserved. | |
PS> ipmo "C:\Users\Akira\Documents\Visual Studio 2013\Projects\JustMockMigrationDemo\packages\Prig.1.0.0\tools\Urasandesu.Prig" | |
PS> dir | |
Directory: C:\Users\Akira\Documents\Visual Studio 2013\Projects\JustMockMigrationDemo\StaticMockingMigration\bin\Debug | |
Mode LastWriteTime Length Name | |
---- ------------- ------ ---- | |
-a--- 2014/09/28 11:51 5632 StaticMockingMigration.exe | |
-a--- 2014/09/16 6:31 189 StaticMockingMigration.exe.config | |
-a--- 2014/09/28 11:51 17920 StaticMockingMigration.pdb | |
PS> $asmInfo = [System.Reflection.Assembly]::LoadFrom((dir .\StaticMockingMigration.exe).FullName) | |
PS> $asmInfo.GetTypes() | |
IsPublic IsSerial Name BaseType | |
-------- -------- ---- -------- | |
True False Foo System.Object | |
False False FooInternal System.Object | |
True False FooStatic System.Object | |
True False Bar System.Object | |
True False BarExtensions System.Object | |
False False Program System.Object | |
PS> $asmInfo.GetTypes() | pfind | |
Method | |
------ | |
Void Submit() | |
Int32 Execute(Int32) | |
Int32 get_FooProp() | |
Void set_FooProp(Int32) | |
Void .cctor() | |
Void .ctor() | |
Void DoIt() | |
Void .ctor() | |
Void Do() | |
Void Execute() | |
Void .ctor() | |
Int32 Echo(StaticMockingMigration.Bar, Int32) | |
Void Main(System.String[]) | |
Void .ctor() | |
PS> $asmInfo.GetTypes() | pfind | pget | clip # この結果については、StaticMockingMigration.v4.0.30319.v1.0.0.0.prig に貼り付けてください。 | |
PS> $asmInfo = [System.Reflection.Assembly]::LoadWithPartialName("System.Web") | |
PS> $asmInfo.GetTypes() | ? { $_.Name -eq 'httpcontext' } | |
IsPublic IsSerial Name BaseType | |
-------- -------- ---- -------- | |
True False HttpContext System.Object | |
PS> $asmInfo.GetTypes() | ? { $_.Name -eq 'httpcontext' } | pfind -m 'get_current\b' | |
Method | |
------ | |
System.Web.HttpContext get_Current() | |
PS> $asmInfo.GetTypes() | ? { $_.Name -eq 'httpcontext' } | pfind -m 'get_current\b' | pget | clip # この結果については、System.Web.v4.0.30319.v4.0.0.0.prig に貼り付けてください。 | |
PS> exit | |
PS> | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment