SlideShare a Scribd company logo
1 of 72
Guidance Automation
Agenda
1. Visual Studio Extensibility
2. DxAT Project For Visual Studio
3. Visual Studio Industry Partner(VSIP)
4. Guidance Automation Extension & Toolkit (GAX & GAT)
With Example
1. Visual Studio Extensibility
•Visual Studio Extensibility 란 ?
•개발 방법
•개발 방법의 장단점
•DTE 란?
Visual Studio Extensibility – VSX 란?
• Visual Studio IDE(통합 개발 환경)의 모양과 동작을 여러 가지
방법으로 변경
• 반복적인 작업을 프로그래밍 방식으로 자동화
• 추가 기능 및 마법사와 같은 도구를 통해 Visual Studio IDE(통
합 개발 환경)를 확장
Visual Studio Extensibility – VSX 란?
아~~ 구차나!!
빌드 하고,
오류 없으면 자동 체크인 해서
자동으로 이메일을 보내고
자동 배포 될 수 있을까?
Visual Studio Extensibility – 개발 방법
• MACRO -
VB 를 이용하여
간단한 자동화 &
확장성 개체를
만들 수 있다
Visual Studio Extensibility – 개발 방법
• VS
Extensibility
Project
.NET Assembly
로 자동화 개체
를 만든다
Visual Studio Extensibility – MACRO 개발
MACRO 방식의 개발의 장단점
• 장점
– VB 를 이용하여 빠른 개발
• Interpreter 방식으로 바로 결과 확인 가능
• 단점
– 배포의 애매함
• Script 를 굳이 Packaging 하여 배포할 필요가 있는가..??
– 소스코드 노출
– UI 생성이 불가능 ( 결국 Managed Code 로 개발된 어셈블리 필요)
Visual Studio Extensibility – ManagedCode 개발
Managed Code 개발의 장점
• 장점
– MACRO 방식의 단점을 수용 가능
• 단점
– Visual Studio 가 Runtime 시 Load 되므로, 초기 실행 속도 저하
Visual Studio Extensibility – DTE 란?
• EnvDTE 어셈블리에 위치
• 계층 구조상 최상위 ROOT 개체
Visual Studio Extensibility – DTE 란?
Root
ObjectInterface
Visual Studio 2003
(EnvDTE)
Visual Studio 2005
(EnvDTE80)
Visual Studio 2008
(EnvDTE90)
Inherit
Visual Studio Extensibility – 자동화 개체 모델
3. Visual Studio Industry Partner,
Visual Studio Integration Package
• Visual Studio Industry Partner (VSIP) 란?
• Visual Studio Integration Package (VSIP) 란?
VSIP – VSIP 란?
• Visual Studio Integration Package ?
Visual Studio Industry Partner ?
• Visual Studio 가 제공하는 Editor 나 Designer 등이 아닌, 전혀
새로운 기능이 필요할 경우
• CHM, HTML 등의 도움말이 아닌, MSDN Document 와 통합
• 새로운 프로젝트 형식이나 언어(Language) 개발
• Visual Studio 의 기능과 유사한 별도의 Tool 이 필요할때
VSIP – VSIP Samples
4. Guidance Automation Extension &
Toolkit (GAX & GAT)
With Example
• GAT 개념잡기
• GAT 개발하기
• GAT 예제
4-1. GAT 개념잡기
• GAX 란?
• GAT 란?
• GAT 구조
• GAT 관련 용어
• 기능별 용도
GAT – GAX 란?
• GAX(Guidance Pacakge Extensions) 는 Guidance Package
를 실행하기 위한 Base Assemblies
• Last Version is February 2008 Release
• Download
http://www.microsoft.com/downloads/details.aspx?FamilyI
D=df79c099-4753-4a59-91e3-
5020d9714e4e&DisplayLang=en
GAT – GAT 란?
• GAT(Guidance Automation Toolkit) 은 Frameworks,
Components, Patterns 를 재사용하기 위한 풍부한 사용자 경
험(UX) 을 만들기 위한 아키텍처를 제공하여 Visual Studio 를
확장
– 수동적인 과정을 자동으로 재사용할 수 있도록 통합
– 반복적이고 오류가 생길 수 있는 작업을 일관되게 처리
• Last Version is February 2008 Release
• Download
http://www.microsoft.com/downloads/details.aspx?FamilyI
D=b91066b3-d1d6-4990-a45f-34cf8dbdc60c&DisplayLang=e
n
GAT - Position
Visual Studio SDK
Guidance Automation Extension(GAX)
Guidance Automation Toolkit(GAT)
Guidance Package
Recipe Recipe
Recipe Recipe
EntLib
Guidance
Pacakage
Recipe Recipe Recipe
Guidance Automation Extension ( GAX )
GAT – P&P 관계도
Smart client
Software
Factory
Web client
Software
Factory
Web Service
Software
Factory
VSTS System
Management
Model Designer
Power Tool
Custom Guidance
Package
Guidance
Automation Toolkit
Enterprise Library
Custom
Framework
GAT - Guidance life cycle
GAT – Recipe Framework 개념
• Visual Studio 의 기능을 확장할 수 있는 Visual Studio
Package 이다
GAT – Recipe Framework 의 용어
• Recipe ?
– Guidance Pacakage 는 수동 또는 일련의 순차적인 행위를 자동화 한다
– 즉, 반복적인 작업을 단순화 하는 것
– 작업 단위의 묶음
• Action ?
– 순차적인 일련의 작업의 단위이다
• Argument ?
– 명시적으로 변수를 선언한다
• Value Provider ?
– Argument 로 전달되는 값을 설정하거나 초기화 한다
GAT – Recipe Framework 의 용어
• Bound Recipe
– Visual Studio 의 특정 element(또는 UI) 와 매핑된다
– Recipe Framework 에서 관리한다
• Unbound Recipe
– Recipe Reference 와 매핑된다
– Launch Point 를 갖기 위해 활성화 할 수 있는 조건(IsEnabledFor) 을 기
술할 수 있다.
Recipe
GAT – Recipe VS Family
Argument=아빠 Argument=엄마 Argument=아들 Argument=딸
ValueProvider=55 ValueProvider=50 ValueProvider=26 ValueProvider=22
Action 아빠=회사 출근
Action 엄마=가사
Action 아들=아르바이트
Action 딸=대학교
GAT – Recipe VS Family
건복이네 Recipe
성태네 Recipe
현정이네 Recipe
승한이네 Recipe
재두네 Recipe
철의네 Recipe
재우네 Recipe
유철이네 Recipe
준일이네 Recipe
GAT – Recipe 구조
GAT – Launch Point in GAT
GAT – Launch Point in GAT
GAT – Launch Point in GAT
GAT – Launch Point in GAT
GAT – Components of the Guidance Automation Toolkit
Visual Studio IDE
RecipeFramework
Wizard Framework
GAT
GAT – Recipe Framework
1. .NET Framework 과 Service
Containers 를 통합
2. Recipe Framework 에서 광범위
하게 사용한다
GAT – Recipe Framework1. 다른 컴포넌트에게 Configuration Service
를 제공
2. 이를 읽고, 증명하고, 검토한다.
3. Common Assembly 에 포함
GAT – Recipe Framework
1. Guidance Package 를 활성화시킨다
2. Recipe 를 관리한다
3. Template 과 Recipe의 실행을 활성/비활성
담당
GAT – Recipe Framework
1. Visual Studio 에 호스팅 됨
2. Recipe Framework 통합
GAT – Wizard Framework
1. 화면의 Wizard Page 와 필드의
구문을 해석
2. 개발자에게 자동으로 Laid-out
페이지를 보여준다
3. 필드의 값을 모은다
4. Recipe Arguments 로 필드를 결합,
Argument 로 필드값을 통과
시킨다
5. 참고 문서를 Help Button 과
연동한다
GAT – T4TemplatingEngine
Text Template Transformation Toolkit
1. Input / Return 할 수 있는
스크립트(VB,C# 과 유사)를 제공
2. 동적인 템플릿을 만들 수 있다
3. 대부분의 Class, XML 파일을 만들 수
있다
GAT – The Guidance Package Management UI1. 설치된 Guidance Package 보기
2. Guidance Package 내용 조사(Recipe, Action)
3. Guidance Package 활성/비활성
4. 사용할 수 있는 Recipe 와 Template 보기
5. Recipe 실행하기
6. Recipe Reference 삭제하기
GAT – The Guidance Package Management UI
1. Guidance Package 를 선택한다
2. Guidance Package 의 개략적인 정보를
보여준다
3. Recipe 와 Template 을 활성화한다
4. Recipe 와 Template 의 History 를
관리한다
5. Recipe 와 Template 을 실행Guidance Navigator
4-2. GAT 개발하기
• 프로젝트 생성하기
• Guidance Package Configuration File구조
• 예제
• 개발 Tip
GAT – 프로젝트 생성하기
GAT – GAT 개발환경 장점
• 잘 정의된 XML 스키마와 XML 프로그래밍
• 구현부만 구현
• Setup Project 가 포함되어, 배포가 편리
GAT – Guidance Package Coniguration File
GuidancePackage
Recipe Arguments
HostData
Action
GatheringServiceData
Argument ValueProvider
Converter
CommandBar
Input
Output
Wizard Pages Page
Fields
Field
GAT - Guidance Package Configuration File
<GuidancePackage xmlns="http://schemas.microsoft.com/pag/gax-core”>
<Recipe Name="Step2">
<Caption>Step 2 - Action2</Caption>
<Arguments>
<Argument Name="Param1" Type="System.String"/>
</Arguments>
<GatheringServiceData>
<Wizard xmlns="http://schemas.microsoft.com/pag/gax-wizards"SchemaVersion="1.0">
<Pages>
<Page>
<Title>이름을 입력하세요</Title>
<Fields>
<Field ValueName="Param1"Label="이름"/>
</Fields>
</Page>
</Pages>
</Wizard>
</GatheringServiceData>
<Actions>
<Action Name="UmcAction2" Type="GATTest.Actions.UmcAction2, GATTest">
<Input Name="Param1" RecipeArgument="Param1"/>
</Action>
</Actions>
</Recipe>
</GuidancePackage xmlns="http://schemas.microsoft.com/pag/gax-core”>
GAT – Action Element
• 하나의 Recipe 안에서의 작업의 단위
• <Actions> Element 에 정의한다
– Action 이 선언된 순서대로 실행한다
• Action 의 세가지 정의 방법
– <Actions>
• Action 을 Execution 하고, Throw 를 그대로 전달한다
– <Actions ExecutionServiceType=“Type, AssemblyName”>
• Action 이 여러 개일 경우, Throw 시 Custom Undo Process 를 실행
– <Actions CoordinatorServiceType=“Type, AssemblyName”>
• Action 을 순차적거나 반복적으로 실행할 수 있다
GAT – Action Element
<Action Name="UmcAction1" Type="GATTest.Actions.UmcAction1, GATTest">
<Input Name="Argument1" RecipeArgument="Argument1"/>
<Output Name="OutputArgument1" />
</Action>
namespace GATTest.Actions
{
public class UmcAction1 : Action
{
[Input] public string Argument1 { get; set; }
[Output] public string OutputArgument1 { get; set; }
public override void Execute()
{
System.Windows.Forms.MessageBox.Show("Hello Action1");
}
public override void Undo()
{
System.Windows.Forms.MessageBox.Show("Undo Action1");
}
}
}
반드시 Full ClassName 과 Assembly Name 을 명시
GAT – Action Element
GAT 가 제공하는 Common Actions
• TextTemplateAction
• AddItemFromStringAction
• AddProjectDependencyAction
• CreateProjectAction
• CreateUnboundReferenceAction
• GetProjectAction
• RenameProjectAction
• DoNothingAction
GAT – CommandBar Element
• <HostData> Element 에 포함된다
• <CommandBar> Element 는 다음과 같은 Name 값을 가질 수
있다
– Solution
– Solution Folder
– Solution Add
– Solution Folder Add
– Project
– Project Add
– Folder
– Item
– Web Project
– Web Item
– Web Folder
GAT – CommandBar Element
• Unbound Recipe 만 CommandBar UI 를 가질 수 있다
• Bound Recipe 는 CommandBar UI 를 가질 수 없다
GAT – CommandBar Element
<Recipe Name="Step8" Bound="false">
<Caption>Step 8 - CommandBar</Caption>
<HostData>
<Icon ID="680"/>
<CommandBar Name="Solution"/>
<CommandBar Name="Project"/>
<CommandBar Name="Solution Folder"/>
<CommandBar Name="Project Add"/>
<CommandBar Name="Solution Add"/>
<CommandBar Name="Solution Folder Add"/>
</HostData>
</Recipe>
GAT – CommandBar Element
<GuidancePackage xmlns="http://schemas.microsoft.com/pag/gax-core"
Name="GATTest"
Caption="GATTest"
Description="GATTest"
BindingRecipe="BindingRecipe"
Guid="0b80515e-1bad-48ba-a0ff-f301ecb03bc3"
SchemaVersion="1.0">
<HostData>
<Menu Name="CommonMenu" Text="Here Text...">
<CommandBar Name="Solution"/>
</Menu>
</HostData>
<Recipe Name="Step1“>
<HostData>
<CommandBar Menu="CommonMenu"/>
</HostData>
</Recipe>
</GuidancePackage>
GAT – CommandBar Element
• Unbound Recipe 의 Launch Point 를 만들려면??
<GuidancePackage xmlns="http://schemas.microsoft.com/pag/gax-core"
Name="GATTest"
Caption="GATTest"
Description="GATTest"
BindingRecipe="BindingRecipe"
Guid="0b80515e-1bad-48ba-a0ff-f301ecb03bc3"
SchemaVersion="1.0">
<Recipes>
<Recipe Name="BindingRecipe“>
<Actions>
<Action Name="UnboundRecipeSample" Type="RefCreator" AssetName="Step1"
ReferenceType="GATTest.References.AnyElementReference, GATTest" />
</Actions>
</Recipe>
<Recipe Name="Step1" Bound="false">
<HostData>
<CommandBar Name="Solution"/>
</HostData>
<Actions>
<Action Name="UmcAction1" Type="GATTest.Actions.UmcAction1, GATTest" />
</Actions>
</Recipe>
</GuidancePackage>
GAT – CommandBar Element
• Unbound Recipe Reference 만들려면??
[Serializable]
public class AnyElementReference : UnboundRecipeReference
{
public AnyElementReference(string recipe) : base(recipe) { }
protected AnyElementReference(SerializationInfo info, StreamingContext
context) : base(info, context) { }
public override bool IsEnabledFor(object target)
{
// Reference Launch Point(CommandBar) 가 표시될 조건
return true;
}
public override string AppliesTo
{
get { return “Guidance Automation Manager 에 표시될 적용 조건"; }
}
}
GAT – CommandBar Element 제한사항
• Solution Explorer(솔루션 탐색기) 에만 Command Bar 를 제공
• Hierarchy 한 구조를 가질 수 없음
• References / Web References / Service References 의
Launch Point 를 제공하지 않음
GAT – Gathering Arguments
• Recipe 에서 사용하는 모든 Argument 는 <Arguments> 요소
안에 정의한다
• Required Attribute 은 필수 여부를 나타낸다 ( 기본값 true )
GAT – Gathering Arguments
<Recipe Name="Step3">
<Arguments>
<Argument Name="Param1" Type="System.String" />
</Arguments>
<Actions>
<Action Name="UmcOutputParamAction11"
Type="GATTest.Actions.UmcOutputParamAction1_1, GATTest">
<Input Name="Param1" RecipeArgument="Param1" />
<Output Name="OutParam1" />
</Action>
<Action Name="UmcOutputParamAction12"
Type="GATTest.Actions.UmcOutputParamAction1_2, GATTest">
<Input Name="Param1" ActionOutput="UmcOutputParamAction11.OutParam1" />
</Action>
</Actions>
</Recipe>
GAT – Gathering Arguments
<Recipe Name="Step3">
<Arguments>
<Argument Name="Param1" Type="System.String" Required="false" />
</Arguments>
</Recipe>
[Input(Required=false)]
public string Param1 { get; set; }
GAT – Gathering Arguments – Type Converter
<Argument Name="Param1" Type="System.String">
<Converter Type="GATTest.Converters.DxFamileConverter, GATTest" />
</Argument>
public class DxFamileConverter : TypeConverter
{
public override bool IsValid(ITypeDescriptorContext context, object value)
{
// 지정된 값 개체를 이 형식에 사용할 수 있는지 여부를 반환합니다
}
public override bool GetStandardValuesExclusive(ITypeDescriptorContext context)
{
// GetStandardValues에서 반환된 표준 값 컬렉션이 단독 목록인지 여부를 반환
return false;
}
public override bool GetStandardValuesSupported(ITypeDescriptorContext context)
{
// 이 개체가 목록에서 선택할 수 있는 표준 값 집합을 지원하는지 여부를 반환합니다.
return true;
}
public override StandardValuesCollection GetStandardValues(ITypeDescriptorContext context)
{
// 데이터 형식의 표준 값 컬렉션을 반환합니다.
return new StandardValuesCollection(validValues);
}
}
Type Converter 를 이용하여 개체의 Type 변경하기
GAT – Gathering Arguments – Type Converter
Recipe Framework 이 제공하는 Type Converters
Microsoft.Practices.RecipeFramework.Library.Converters.CodeIdentifierStringConverter
Microsoft.Practices.RecipeFramework.Library.Converters.DteElementConverter
Microsoft.Practices.RecipeFramework.Library.Converters.NamespaceStringConverter
Microsoft.Practices.RecipeFramework.Library.Converters.ProjectConverter
Microsoft.Practices.RecipeFramework.Library.Converters.ProjectItemConverter
Microsoft.Practices.RecipeFramework.Library.Converters.ProjectItemOrEmptyConverter
Microsoft.Practices.RecipeFramework.Library.Converters.ProjectOrEmptyConverter
Microsoft.Practices.RecipeFramework.Library.Converters.ReferenceConverter
Microsoft.Practices.RecipeFramework.Library.Converters.RegexMatchStringConverter
Microsoft.Practices.RecipeFramework.Library.Converters.RegexStringNotMatchConverter
Microsoft.Practices.RecipeFramework.Library.Converters.SolutionConverter
Microsoft.Practices.RecipeFramework.Library.Converters.SolutionFolderConverter
Microsoft.Practices.RecipeFramework.Library.Converters.SolutionFolderOrEmptyConverter
Microsoft.Practices.RecipeFramework.Library.Converters.SolutionOrEmptyConverter
Microsoft.Practices.RecipeFramework.Library.Converters.WebReferenceConverter
GAT – Gathering Arguments – Value Provider
• Argument 의 값이 특정 개체임을 명시하여(Type Converter),
해당 Value 값을 취득
• Wizard Framework 과 연계, 초기값을 세팅
GAT – Gathering Arguments – Value Provider
<Argument Name="Param3" Type="DTEObject">
<Converter Type="Microsoft.Practices.RecipeFramework.Library.Converters.SolutionFolderConverter,
Microsoft.Practices.RecipeFramework.Library" />
<ValueProvider Type="GATTest.ValueProviders.SolutionValueProvider, GATTest"/>
</Argument>
public class SolutionValueProvider : ValueProvider
{
public override bool OnBeginRecipe(object currentValue, out object newValue)
{
newValue = GetService<EnvDTE.DTE>().Solution.Item(2);
return true;
}
}
GAT – Wizard Framework
• VSWizard Framework 를 확장한 프레임워크이다
• <GatheringServiceData> 요소 안에 정의한다
• Laid-out 형태의 UI 를 제공한다
GAT – Wizard Framework
<Recipe Name="Step2">
<Caption>Step 2 - Action2</Caption>
<Arguments>
<Argument Name="Param1" Type="System.String"/>
</Arguments>
<GatheringServiceData>
<Wizard xmlns="http://schemas.microsoft.com/pag/gax-wizards" SchemaVersion="1.0">
<Pages>
<Page>
<Title>이름을 입력하세요</Title>
<Fields>
<Field ValueName="Param1" Label="이름"/>
</Fields>
</Page>
</Pages>
</Wizard>
</GatheringServiceData>
<Actions>
<Action Name="UmcAction2" Type="GATTest.Actions.UmcAction2, GATTest">
<Input Name="Param1" RecipeArgument="Param1"/>
</Action>
</Actions>
</Recipe>
GAT – Wizard Framework
<GatheringServiceData>
<Wizard xmlns="http://schemas.microsoft.com/pag/gax-wizards" SchemaVersion="1.0">
<Pages>
<Page>
<Title>Step 6 - Editor</Title>
<Fields>
<Field ValueName="CurrentProject" Label="Selection Project">
<Editor
Type="Microsoft.Practices.RecipeFramework.Library.Editors.SolutionPickerEditor,
Microsoft.Practices.RecipeFramework.Library"/>
</Field>
</Fields>
</Page>
</Pages>
</Wizard>
</GatheringServiceData>
GAT – Wizard Framework – Custom Wizard
<Page Type="GATTest.CustomWizardPages.DxCustomWizard, GATTest" Width="700" Height="469">
<Title>Custom Wizard</Title>
<Fields>
<Field ValueName="Param1" Label="Label1" />
</Fields>
</Page>
public partial class DxCustomWizard : CustomWizardPage
{
public DxCustomWizard(WizardForm parent) : base(parent)
{
InitializeComponent();
}
[RecipeArgument]
public string Param1 { 생략… }
private void textBox1_TextChanged(object sender, EventArgs e)
{
IDictionaryService dictionaryService = GetService(typeof(IDictionaryService)) asIDictionaryService;
if (string.IsNullOrEmpty(textBox1.Text.ToString()))
dictionaryService.SetValue("Param1", null);
else
dictionaryService.SetValue("Param1", textBox1.Text.ToString());
}
}
GAT – Type Alias
• 미리 Type 을 지정하여 Alias 로 Type 을 지정한다
<Recipe Name="Step5">
<Types>
<TypeAlias Name="DTEObject"
Type="EnvDTE.Project, EnvDTE, Version=8.0.0.0, Culture=neutral,
PublicKeyToken=b03f5f7f11d50a3a"/>
</Types>
<Arguments>
<Argument Name="Param1" Type="DTEObject">
<ValueProvider
Type="Microsoft.Practices.RecipeFramework.Library.ValueProviders.FirstSelectedProjec
t, Microsoft.Practices.RecipeFramework.Library" />
</Argument>
</Arguments>
</Recipe>
GAT – ETC Elements
• <xi:include>
– 다른 위치의 XML 파일을 현재의 Configuration 에 포함한다
ex) <xi:include href="TypeAlias.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
• <OverView>
– Guidance Automation Manager 의 Overview 를 표시한다
<Overview Url="http://dotnetxpert.com" />
• <DocumentationLinks>
– Recipe 의 참고 문서를 Guidance Navigator Window 에 표시하고,
NextStep 문서는 History 에서 탐색할 수 있다
ex) <DocumentationLinks>
<Link Caption="A" Url="http://a.com" Kind="Documentation"/>
<Link Caption="B" Url="http://b.com" Kind="NextStep"/>
</DocumentationLinks>
GAT – 개발 Tips – 디버깅 방법
1. 프로젝트 속성의 „시작 외부 프로그램‟ 을 수정한다
2. 프로젝트 속성의 „명령줄 인수‟를 수정한다
GAT – 개발 Tips – 디버깅 방법
1. 한번만 Register Guidance Package 를 수정한다
2. Setup Project 를 Unload 해 놓는다
3. 이후부터 Quick Register 로 빌드한다
[GAT/GAX] Guidance Automation Extensions

More Related Content

Similar to [GAT/GAX] Guidance Automation Extensions

Azure OpenAI 및 ChatGPT 실습가이드 (Hands-on-lab)
Azure OpenAI 및 ChatGPT 실습가이드 (Hands-on-lab) Azure OpenAI 및 ChatGPT 실습가이드 (Hands-on-lab)
Azure OpenAI 및 ChatGPT 실습가이드 (Hands-on-lab) Minnie Seungmin Cho
 
maven 소개
maven 소개maven 소개
maven 소개Suan Lee
 
Build Team Foundation Architecture
Build Team Foundation ArchitectureBuild Team Foundation Architecture
Build Team Foundation Architecture준일 엄
 
테스트수행사례 W통합보안솔루션
테스트수행사례 W통합보안솔루션테스트수행사례 W통합보안솔루션
테스트수행사례 W통합보안솔루션SangIn Choung
 
Sonarqube 20160509
Sonarqube 20160509Sonarqube 20160509
Sonarqube 20160509영석 조
 
[Atlassian in 부산]분야 별 Atlassian 솔루션 적용 사례_KIC
[Atlassian in 부산]분야 별 Atlassian 솔루션 적용 사례_KIC[Atlassian in 부산]분야 별 Atlassian 솔루션 적용 사례_KIC
[Atlassian in 부산]분야 별 Atlassian 솔루션 적용 사례_KICAtlassian 대한민국
 
01.개발환경 교육교재
01.개발환경 교육교재01.개발환경 교육교재
01.개발환경 교육교재Hankyo
 
성장하는 스타트업의 프로세스 개척기
성장하는 스타트업의 프로세스 개척기성장하는 스타트업의 프로세스 개척기
성장하는 스타트업의 프로세스 개척기DomainDriven DomainDriven
 
Open standard open cloud engine (3)
Open standard open cloud engine (3)Open standard open cloud engine (3)
Open standard open cloud engine (3)uEngine Solutions
 
투비웨어 AgitarOne Junit 단위테스트자동화 솔루션소개_201608_v1.2
투비웨어 AgitarOne Junit 단위테스트자동화 솔루션소개_201608_v1.2투비웨어 AgitarOne Junit 단위테스트자동화 솔루션소개_201608_v1.2
투비웨어 AgitarOne Junit 단위테스트자동화 솔루션소개_201608_v1.2tobeware
 
JBoss EAP on Azure Workshop
JBoss EAP on Azure Workshop JBoss EAP on Azure Workshop
JBoss EAP on Azure Workshop rockplace
 
Enterprise Java web Deployment Strategy
Enterprise Java web Deployment StrategyEnterprise Java web Deployment Strategy
Enterprise Java web Deployment StrategySukjin Yun
 
테스트자동화와 TDD
테스트자동화와 TDD테스트자동화와 TDD
테스트자동화와 TDDSunghyouk Bae
 
Spring Boot + React + Gradle in VSCode
Spring Boot + React + Gradle in VSCodeSpring Boot + React + Gradle in VSCode
Spring Boot + React + Gradle in VSCodedpTablo
 
Eclipse RAP - Single Source
Eclipse RAP - Single SourceEclipse RAP - Single Source
Eclipse RAP - Single Sourcecho hyun jong
 
애자일과 애자일 테스트 소개 (테스트기본교육 3장 2절)
애자일과 애자일 테스트 소개 (테스트기본교육 3장 2절)애자일과 애자일 테스트 소개 (테스트기본교육 3장 2절)
애자일과 애자일 테스트 소개 (테스트기본교육 3장 2절)SangIn Choung
 
[17.02.09] Github introduction (Korean Version)
[17.02.09] Github introduction (Korean Version)[17.02.09] Github introduction (Korean Version)
[17.02.09] Github introduction (Korean Version)Ildoo Kim
 
프로젝트 관리 및 지켜야 할 사항들
프로젝트 관리 및 지켜야 할 사항들프로젝트 관리 및 지켜야 할 사항들
프로젝트 관리 및 지켜야 할 사항들Lee Geonhee
 

Similar to [GAT/GAX] Guidance Automation Extensions (20)

Azure OpenAI 및 ChatGPT 실습가이드 (Hands-on-lab)
Azure OpenAI 및 ChatGPT 실습가이드 (Hands-on-lab) Azure OpenAI 및 ChatGPT 실습가이드 (Hands-on-lab)
Azure OpenAI 및 ChatGPT 실습가이드 (Hands-on-lab)
 
maven 소개
maven 소개maven 소개
maven 소개
 
Maven
MavenMaven
Maven
 
Build Team Foundation Architecture
Build Team Foundation ArchitectureBuild Team Foundation Architecture
Build Team Foundation Architecture
 
Modern PHP
Modern PHPModern PHP
Modern PHP
 
테스트수행사례 W통합보안솔루션
테스트수행사례 W통합보안솔루션테스트수행사례 W통합보안솔루션
테스트수행사례 W통합보안솔루션
 
Sonarqube 20160509
Sonarqube 20160509Sonarqube 20160509
Sonarqube 20160509
 
[Atlassian in 부산]분야 별 Atlassian 솔루션 적용 사례_KIC
[Atlassian in 부산]분야 별 Atlassian 솔루션 적용 사례_KIC[Atlassian in 부산]분야 별 Atlassian 솔루션 적용 사례_KIC
[Atlassian in 부산]분야 별 Atlassian 솔루션 적용 사례_KIC
 
01.개발환경 교육교재
01.개발환경 교육교재01.개발환경 교육교재
01.개발환경 교육교재
 
성장하는 스타트업의 프로세스 개척기
성장하는 스타트업의 프로세스 개척기성장하는 스타트업의 프로세스 개척기
성장하는 스타트업의 프로세스 개척기
 
Open standard open cloud engine (3)
Open standard open cloud engine (3)Open standard open cloud engine (3)
Open standard open cloud engine (3)
 
투비웨어 AgitarOne Junit 단위테스트자동화 솔루션소개_201608_v1.2
투비웨어 AgitarOne Junit 단위테스트자동화 솔루션소개_201608_v1.2투비웨어 AgitarOne Junit 단위테스트자동화 솔루션소개_201608_v1.2
투비웨어 AgitarOne Junit 단위테스트자동화 솔루션소개_201608_v1.2
 
JBoss EAP on Azure Workshop
JBoss EAP on Azure Workshop JBoss EAP on Azure Workshop
JBoss EAP on Azure Workshop
 
Enterprise Java web Deployment Strategy
Enterprise Java web Deployment StrategyEnterprise Java web Deployment Strategy
Enterprise Java web Deployment Strategy
 
테스트자동화와 TDD
테스트자동화와 TDD테스트자동화와 TDD
테스트자동화와 TDD
 
Spring Boot + React + Gradle in VSCode
Spring Boot + React + Gradle in VSCodeSpring Boot + React + Gradle in VSCode
Spring Boot + React + Gradle in VSCode
 
Eclipse RAP - Single Source
Eclipse RAP - Single SourceEclipse RAP - Single Source
Eclipse RAP - Single Source
 
애자일과 애자일 테스트 소개 (테스트기본교육 3장 2절)
애자일과 애자일 테스트 소개 (테스트기본교육 3장 2절)애자일과 애자일 테스트 소개 (테스트기본교육 3장 2절)
애자일과 애자일 테스트 소개 (테스트기본교육 3장 2절)
 
[17.02.09] Github introduction (Korean Version)
[17.02.09] Github introduction (Korean Version)[17.02.09] Github introduction (Korean Version)
[17.02.09] Github introduction (Korean Version)
 
프로젝트 관리 및 지켜야 할 사항들
프로젝트 관리 및 지켜야 할 사항들프로젝트 관리 및 지켜야 할 사항들
프로젝트 관리 및 지켜야 할 사항들
 

More from 준일 엄

Understanding open api service 엄준일
Understanding open api service 엄준일Understanding open api service 엄준일
Understanding open api service 엄준일준일 엄
 
배포 아키텍처_2011-09-16_엄준일
배포 아키텍처_2011-09-16_엄준일배포 아키텍처_2011-09-16_엄준일
배포 아키텍처_2011-09-16_엄준일준일 엄
 
배포 프로세스_퀵스타트_20111027_엄준일
배포 프로세스_퀵스타트_20111027_엄준일배포 프로세스_퀵스타트_20111027_엄준일
배포 프로세스_퀵스타트_20111027_엄준일준일 엄
 
.NET 장애 개선 로드맵
.NET 장애 개선 로드맵.NET 장애 개선 로드맵
.NET 장애 개선 로드맵준일 엄
 
.NET 장애 개선 로드맵
.NET 장애 개선 로드맵.NET 장애 개선 로드맵
.NET 장애 개선 로드맵준일 엄
 
Umc.Core Frameworks
Umc.Core FrameworksUmc.Core Frameworks
Umc.Core Frameworks준일 엄
 
Understanding Open Api Service
Understanding Open Api ServiceUnderstanding Open Api Service
Understanding Open Api Service준일 엄
 
엄준일 04일차 HTML/Javascript 교육
엄준일 04일차 HTML/Javascript 교육엄준일 04일차 HTML/Javascript 교육
엄준일 04일차 HTML/Javascript 교육준일 엄
 
컨설팅 프로세스
컨설팅 프로세스컨설팅 프로세스
컨설팅 프로세스준일 엄
 
Umc 와 함께하는 asp.net 해킹하기 (1)
Umc 와 함께하는 asp.net 해킹하기 (1)Umc 와 함께하는 asp.net 해킹하기 (1)
Umc 와 함께하는 asp.net 해킹하기 (1)준일 엄
 
개발자가 알아야 할 .NET Framework 하이라이트 2.0 에서 3.5 SP1 까지…
개발자가 알아야 할 .NET Framework 하이라이트 2.0 에서 3.5 SP1 까지… 개발자가 알아야 할 .NET Framework 하이라이트 2.0 에서 3.5 SP1 까지…
개발자가 알아야 할 .NET Framework 하이라이트 2.0 에서 3.5 SP1 까지… 준일 엄
 
Visual Studio 2008 SP1
Visual Studio 2008 SP1Visual Studio 2008 SP1
Visual Studio 2008 SP1준일 엄
 
Visual studio team system with agile tech days 2010
Visual studio team system with agile tech days 2010Visual studio team system with agile tech days 2010
Visual studio team system with agile tech days 2010준일 엄
 
[Visual studio camp #1] Enterprise Software Testing
[Visual studio camp #1] Enterprise Software Testing[Visual studio camp #1] Enterprise Software Testing
[Visual studio camp #1] Enterprise Software Testing준일 엄
 
Managed Extensibility Framework
Managed Extensibility FrameworkManaged Extensibility Framework
Managed Extensibility Framework준일 엄
 
Testing 엄준일의 slide_share
Testing 엄준일의 slide_shareTesting 엄준일의 slide_share
Testing 엄준일의 slide_share준일 엄
 

More from 준일 엄 (16)

Understanding open api service 엄준일
Understanding open api service 엄준일Understanding open api service 엄준일
Understanding open api service 엄준일
 
배포 아키텍처_2011-09-16_엄준일
배포 아키텍처_2011-09-16_엄준일배포 아키텍처_2011-09-16_엄준일
배포 아키텍처_2011-09-16_엄준일
 
배포 프로세스_퀵스타트_20111027_엄준일
배포 프로세스_퀵스타트_20111027_엄준일배포 프로세스_퀵스타트_20111027_엄준일
배포 프로세스_퀵스타트_20111027_엄준일
 
.NET 장애 개선 로드맵
.NET 장애 개선 로드맵.NET 장애 개선 로드맵
.NET 장애 개선 로드맵
 
.NET 장애 개선 로드맵
.NET 장애 개선 로드맵.NET 장애 개선 로드맵
.NET 장애 개선 로드맵
 
Umc.Core Frameworks
Umc.Core FrameworksUmc.Core Frameworks
Umc.Core Frameworks
 
Understanding Open Api Service
Understanding Open Api ServiceUnderstanding Open Api Service
Understanding Open Api Service
 
엄준일 04일차 HTML/Javascript 교육
엄준일 04일차 HTML/Javascript 교육엄준일 04일차 HTML/Javascript 교육
엄준일 04일차 HTML/Javascript 교육
 
컨설팅 프로세스
컨설팅 프로세스컨설팅 프로세스
컨설팅 프로세스
 
Umc 와 함께하는 asp.net 해킹하기 (1)
Umc 와 함께하는 asp.net 해킹하기 (1)Umc 와 함께하는 asp.net 해킹하기 (1)
Umc 와 함께하는 asp.net 해킹하기 (1)
 
개발자가 알아야 할 .NET Framework 하이라이트 2.0 에서 3.5 SP1 까지…
개발자가 알아야 할 .NET Framework 하이라이트 2.0 에서 3.5 SP1 까지… 개발자가 알아야 할 .NET Framework 하이라이트 2.0 에서 3.5 SP1 까지…
개발자가 알아야 할 .NET Framework 하이라이트 2.0 에서 3.5 SP1 까지…
 
Visual Studio 2008 SP1
Visual Studio 2008 SP1Visual Studio 2008 SP1
Visual Studio 2008 SP1
 
Visual studio team system with agile tech days 2010
Visual studio team system with agile tech days 2010Visual studio team system with agile tech days 2010
Visual studio team system with agile tech days 2010
 
[Visual studio camp #1] Enterprise Software Testing
[Visual studio camp #1] Enterprise Software Testing[Visual studio camp #1] Enterprise Software Testing
[Visual studio camp #1] Enterprise Software Testing
 
Managed Extensibility Framework
Managed Extensibility FrameworkManaged Extensibility Framework
Managed Extensibility Framework
 
Testing 엄준일의 slide_share
Testing 엄준일의 slide_shareTesting 엄준일의 slide_share
Testing 엄준일의 slide_share
 

[GAT/GAX] Guidance Automation Extensions

  • 2. Agenda 1. Visual Studio Extensibility 2. DxAT Project For Visual Studio 3. Visual Studio Industry Partner(VSIP) 4. Guidance Automation Extension & Toolkit (GAX & GAT) With Example
  • 3. 1. Visual Studio Extensibility •Visual Studio Extensibility 란 ? •개발 방법 •개발 방법의 장단점 •DTE 란?
  • 4. Visual Studio Extensibility – VSX 란? • Visual Studio IDE(통합 개발 환경)의 모양과 동작을 여러 가지 방법으로 변경 • 반복적인 작업을 프로그래밍 방식으로 자동화 • 추가 기능 및 마법사와 같은 도구를 통해 Visual Studio IDE(통 합 개발 환경)를 확장
  • 5. Visual Studio Extensibility – VSX 란? 아~~ 구차나!! 빌드 하고, 오류 없으면 자동 체크인 해서 자동으로 이메일을 보내고 자동 배포 될 수 있을까?
  • 6. Visual Studio Extensibility – 개발 방법 • MACRO - VB 를 이용하여 간단한 자동화 & 확장성 개체를 만들 수 있다
  • 7. Visual Studio Extensibility – 개발 방법 • VS Extensibility Project .NET Assembly 로 자동화 개체 를 만든다
  • 8. Visual Studio Extensibility – MACRO 개발 MACRO 방식의 개발의 장단점 • 장점 – VB 를 이용하여 빠른 개발 • Interpreter 방식으로 바로 결과 확인 가능 • 단점 – 배포의 애매함 • Script 를 굳이 Packaging 하여 배포할 필요가 있는가..?? – 소스코드 노출 – UI 생성이 불가능 ( 결국 Managed Code 로 개발된 어셈블리 필요)
  • 9. Visual Studio Extensibility – ManagedCode 개발 Managed Code 개발의 장점 • 장점 – MACRO 방식의 단점을 수용 가능 • 단점 – Visual Studio 가 Runtime 시 Load 되므로, 초기 실행 속도 저하
  • 10. Visual Studio Extensibility – DTE 란? • EnvDTE 어셈블리에 위치 • 계층 구조상 최상위 ROOT 개체
  • 11. Visual Studio Extensibility – DTE 란? Root ObjectInterface Visual Studio 2003 (EnvDTE) Visual Studio 2005 (EnvDTE80) Visual Studio 2008 (EnvDTE90) Inherit
  • 12. Visual Studio Extensibility – 자동화 개체 모델
  • 13. 3. Visual Studio Industry Partner, Visual Studio Integration Package • Visual Studio Industry Partner (VSIP) 란? • Visual Studio Integration Package (VSIP) 란?
  • 14. VSIP – VSIP 란? • Visual Studio Integration Package ? Visual Studio Industry Partner ? • Visual Studio 가 제공하는 Editor 나 Designer 등이 아닌, 전혀 새로운 기능이 필요할 경우 • CHM, HTML 등의 도움말이 아닌, MSDN Document 와 통합 • 새로운 프로젝트 형식이나 언어(Language) 개발 • Visual Studio 의 기능과 유사한 별도의 Tool 이 필요할때
  • 15. VSIP – VSIP Samples
  • 16. 4. Guidance Automation Extension & Toolkit (GAX & GAT) With Example • GAT 개념잡기 • GAT 개발하기 • GAT 예제
  • 17. 4-1. GAT 개념잡기 • GAX 란? • GAT 란? • GAT 구조 • GAT 관련 용어 • 기능별 용도
  • 18. GAT – GAX 란? • GAX(Guidance Pacakge Extensions) 는 Guidance Package 를 실행하기 위한 Base Assemblies • Last Version is February 2008 Release • Download http://www.microsoft.com/downloads/details.aspx?FamilyI D=df79c099-4753-4a59-91e3- 5020d9714e4e&DisplayLang=en
  • 19. GAT – GAT 란? • GAT(Guidance Automation Toolkit) 은 Frameworks, Components, Patterns 를 재사용하기 위한 풍부한 사용자 경 험(UX) 을 만들기 위한 아키텍처를 제공하여 Visual Studio 를 확장 – 수동적인 과정을 자동으로 재사용할 수 있도록 통합 – 반복적이고 오류가 생길 수 있는 작업을 일관되게 처리 • Last Version is February 2008 Release • Download http://www.microsoft.com/downloads/details.aspx?FamilyI D=b91066b3-d1d6-4990-a45f-34cf8dbdc60c&DisplayLang=e n
  • 20. GAT - Position Visual Studio SDK Guidance Automation Extension(GAX) Guidance Automation Toolkit(GAT) Guidance Package Recipe Recipe Recipe Recipe EntLib Guidance Pacakage Recipe Recipe Recipe
  • 21. Guidance Automation Extension ( GAX ) GAT – P&P 관계도 Smart client Software Factory Web client Software Factory Web Service Software Factory VSTS System Management Model Designer Power Tool Custom Guidance Package Guidance Automation Toolkit Enterprise Library Custom Framework
  • 22. GAT - Guidance life cycle
  • 23. GAT – Recipe Framework 개념 • Visual Studio 의 기능을 확장할 수 있는 Visual Studio Package 이다
  • 24. GAT – Recipe Framework 의 용어 • Recipe ? – Guidance Pacakage 는 수동 또는 일련의 순차적인 행위를 자동화 한다 – 즉, 반복적인 작업을 단순화 하는 것 – 작업 단위의 묶음 • Action ? – 순차적인 일련의 작업의 단위이다 • Argument ? – 명시적으로 변수를 선언한다 • Value Provider ? – Argument 로 전달되는 값을 설정하거나 초기화 한다
  • 25. GAT – Recipe Framework 의 용어 • Bound Recipe – Visual Studio 의 특정 element(또는 UI) 와 매핑된다 – Recipe Framework 에서 관리한다 • Unbound Recipe – Recipe Reference 와 매핑된다 – Launch Point 를 갖기 위해 활성화 할 수 있는 조건(IsEnabledFor) 을 기 술할 수 있다.
  • 26. Recipe GAT – Recipe VS Family Argument=아빠 Argument=엄마 Argument=아들 Argument=딸 ValueProvider=55 ValueProvider=50 ValueProvider=26 ValueProvider=22 Action 아빠=회사 출근 Action 엄마=가사 Action 아들=아르바이트 Action 딸=대학교
  • 27. GAT – Recipe VS Family 건복이네 Recipe 성태네 Recipe 현정이네 Recipe 승한이네 Recipe 재두네 Recipe 철의네 Recipe 재우네 Recipe 유철이네 Recipe 준일이네 Recipe
  • 28. GAT – Recipe 구조
  • 29. GAT – Launch Point in GAT
  • 30. GAT – Launch Point in GAT
  • 31. GAT – Launch Point in GAT
  • 32. GAT – Launch Point in GAT
  • 33. GAT – Components of the Guidance Automation Toolkit Visual Studio IDE RecipeFramework Wizard Framework GAT
  • 34. GAT – Recipe Framework 1. .NET Framework 과 Service Containers 를 통합 2. Recipe Framework 에서 광범위 하게 사용한다
  • 35. GAT – Recipe Framework1. 다른 컴포넌트에게 Configuration Service 를 제공 2. 이를 읽고, 증명하고, 검토한다. 3. Common Assembly 에 포함
  • 36. GAT – Recipe Framework 1. Guidance Package 를 활성화시킨다 2. Recipe 를 관리한다 3. Template 과 Recipe의 실행을 활성/비활성 담당
  • 37. GAT – Recipe Framework 1. Visual Studio 에 호스팅 됨 2. Recipe Framework 통합
  • 38. GAT – Wizard Framework 1. 화면의 Wizard Page 와 필드의 구문을 해석 2. 개발자에게 자동으로 Laid-out 페이지를 보여준다 3. 필드의 값을 모은다 4. Recipe Arguments 로 필드를 결합, Argument 로 필드값을 통과 시킨다 5. 참고 문서를 Help Button 과 연동한다
  • 39. GAT – T4TemplatingEngine Text Template Transformation Toolkit 1. Input / Return 할 수 있는 스크립트(VB,C# 과 유사)를 제공 2. 동적인 템플릿을 만들 수 있다 3. 대부분의 Class, XML 파일을 만들 수 있다
  • 40. GAT – The Guidance Package Management UI1. 설치된 Guidance Package 보기 2. Guidance Package 내용 조사(Recipe, Action) 3. Guidance Package 활성/비활성 4. 사용할 수 있는 Recipe 와 Template 보기 5. Recipe 실행하기 6. Recipe Reference 삭제하기
  • 41. GAT – The Guidance Package Management UI 1. Guidance Package 를 선택한다 2. Guidance Package 의 개략적인 정보를 보여준다 3. Recipe 와 Template 을 활성화한다 4. Recipe 와 Template 의 History 를 관리한다 5. Recipe 와 Template 을 실행Guidance Navigator
  • 42. 4-2. GAT 개발하기 • 프로젝트 생성하기 • Guidance Package Configuration File구조 • 예제 • 개발 Tip
  • 43. GAT – 프로젝트 생성하기
  • 44. GAT – GAT 개발환경 장점 • 잘 정의된 XML 스키마와 XML 프로그래밍 • 구현부만 구현 • Setup Project 가 포함되어, 배포가 편리
  • 45. GAT – Guidance Package Coniguration File GuidancePackage Recipe Arguments HostData Action GatheringServiceData Argument ValueProvider Converter CommandBar Input Output Wizard Pages Page Fields Field
  • 46. GAT - Guidance Package Configuration File <GuidancePackage xmlns="http://schemas.microsoft.com/pag/gax-core”> <Recipe Name="Step2"> <Caption>Step 2 - Action2</Caption> <Arguments> <Argument Name="Param1" Type="System.String"/> </Arguments> <GatheringServiceData> <Wizard xmlns="http://schemas.microsoft.com/pag/gax-wizards"SchemaVersion="1.0"> <Pages> <Page> <Title>이름을 입력하세요</Title> <Fields> <Field ValueName="Param1"Label="이름"/> </Fields> </Page> </Pages> </Wizard> </GatheringServiceData> <Actions> <Action Name="UmcAction2" Type="GATTest.Actions.UmcAction2, GATTest"> <Input Name="Param1" RecipeArgument="Param1"/> </Action> </Actions> </Recipe> </GuidancePackage xmlns="http://schemas.microsoft.com/pag/gax-core”>
  • 47. GAT – Action Element • 하나의 Recipe 안에서의 작업의 단위 • <Actions> Element 에 정의한다 – Action 이 선언된 순서대로 실행한다 • Action 의 세가지 정의 방법 – <Actions> • Action 을 Execution 하고, Throw 를 그대로 전달한다 – <Actions ExecutionServiceType=“Type, AssemblyName”> • Action 이 여러 개일 경우, Throw 시 Custom Undo Process 를 실행 – <Actions CoordinatorServiceType=“Type, AssemblyName”> • Action 을 순차적거나 반복적으로 실행할 수 있다
  • 48. GAT – Action Element <Action Name="UmcAction1" Type="GATTest.Actions.UmcAction1, GATTest"> <Input Name="Argument1" RecipeArgument="Argument1"/> <Output Name="OutputArgument1" /> </Action> namespace GATTest.Actions { public class UmcAction1 : Action { [Input] public string Argument1 { get; set; } [Output] public string OutputArgument1 { get; set; } public override void Execute() { System.Windows.Forms.MessageBox.Show("Hello Action1"); } public override void Undo() { System.Windows.Forms.MessageBox.Show("Undo Action1"); } } } 반드시 Full ClassName 과 Assembly Name 을 명시
  • 49. GAT – Action Element GAT 가 제공하는 Common Actions • TextTemplateAction • AddItemFromStringAction • AddProjectDependencyAction • CreateProjectAction • CreateUnboundReferenceAction • GetProjectAction • RenameProjectAction • DoNothingAction
  • 50. GAT – CommandBar Element • <HostData> Element 에 포함된다 • <CommandBar> Element 는 다음과 같은 Name 값을 가질 수 있다 – Solution – Solution Folder – Solution Add – Solution Folder Add – Project – Project Add – Folder – Item – Web Project – Web Item – Web Folder
  • 51. GAT – CommandBar Element • Unbound Recipe 만 CommandBar UI 를 가질 수 있다 • Bound Recipe 는 CommandBar UI 를 가질 수 없다
  • 52. GAT – CommandBar Element <Recipe Name="Step8" Bound="false"> <Caption>Step 8 - CommandBar</Caption> <HostData> <Icon ID="680"/> <CommandBar Name="Solution"/> <CommandBar Name="Project"/> <CommandBar Name="Solution Folder"/> <CommandBar Name="Project Add"/> <CommandBar Name="Solution Add"/> <CommandBar Name="Solution Folder Add"/> </HostData> </Recipe>
  • 53. GAT – CommandBar Element <GuidancePackage xmlns="http://schemas.microsoft.com/pag/gax-core" Name="GATTest" Caption="GATTest" Description="GATTest" BindingRecipe="BindingRecipe" Guid="0b80515e-1bad-48ba-a0ff-f301ecb03bc3" SchemaVersion="1.0"> <HostData> <Menu Name="CommonMenu" Text="Here Text..."> <CommandBar Name="Solution"/> </Menu> </HostData> <Recipe Name="Step1“> <HostData> <CommandBar Menu="CommonMenu"/> </HostData> </Recipe> </GuidancePackage>
  • 54. GAT – CommandBar Element • Unbound Recipe 의 Launch Point 를 만들려면?? <GuidancePackage xmlns="http://schemas.microsoft.com/pag/gax-core" Name="GATTest" Caption="GATTest" Description="GATTest" BindingRecipe="BindingRecipe" Guid="0b80515e-1bad-48ba-a0ff-f301ecb03bc3" SchemaVersion="1.0"> <Recipes> <Recipe Name="BindingRecipe“> <Actions> <Action Name="UnboundRecipeSample" Type="RefCreator" AssetName="Step1" ReferenceType="GATTest.References.AnyElementReference, GATTest" /> </Actions> </Recipe> <Recipe Name="Step1" Bound="false"> <HostData> <CommandBar Name="Solution"/> </HostData> <Actions> <Action Name="UmcAction1" Type="GATTest.Actions.UmcAction1, GATTest" /> </Actions> </Recipe> </GuidancePackage>
  • 55. GAT – CommandBar Element • Unbound Recipe Reference 만들려면?? [Serializable] public class AnyElementReference : UnboundRecipeReference { public AnyElementReference(string recipe) : base(recipe) { } protected AnyElementReference(SerializationInfo info, StreamingContext context) : base(info, context) { } public override bool IsEnabledFor(object target) { // Reference Launch Point(CommandBar) 가 표시될 조건 return true; } public override string AppliesTo { get { return “Guidance Automation Manager 에 표시될 적용 조건"; } } }
  • 56. GAT – CommandBar Element 제한사항 • Solution Explorer(솔루션 탐색기) 에만 Command Bar 를 제공 • Hierarchy 한 구조를 가질 수 없음 • References / Web References / Service References 의 Launch Point 를 제공하지 않음
  • 57. GAT – Gathering Arguments • Recipe 에서 사용하는 모든 Argument 는 <Arguments> 요소 안에 정의한다 • Required Attribute 은 필수 여부를 나타낸다 ( 기본값 true )
  • 58. GAT – Gathering Arguments <Recipe Name="Step3"> <Arguments> <Argument Name="Param1" Type="System.String" /> </Arguments> <Actions> <Action Name="UmcOutputParamAction11" Type="GATTest.Actions.UmcOutputParamAction1_1, GATTest"> <Input Name="Param1" RecipeArgument="Param1" /> <Output Name="OutParam1" /> </Action> <Action Name="UmcOutputParamAction12" Type="GATTest.Actions.UmcOutputParamAction1_2, GATTest"> <Input Name="Param1" ActionOutput="UmcOutputParamAction11.OutParam1" /> </Action> </Actions> </Recipe>
  • 59. GAT – Gathering Arguments <Recipe Name="Step3"> <Arguments> <Argument Name="Param1" Type="System.String" Required="false" /> </Arguments> </Recipe> [Input(Required=false)] public string Param1 { get; set; }
  • 60. GAT – Gathering Arguments – Type Converter <Argument Name="Param1" Type="System.String"> <Converter Type="GATTest.Converters.DxFamileConverter, GATTest" /> </Argument> public class DxFamileConverter : TypeConverter { public override bool IsValid(ITypeDescriptorContext context, object value) { // 지정된 값 개체를 이 형식에 사용할 수 있는지 여부를 반환합니다 } public override bool GetStandardValuesExclusive(ITypeDescriptorContext context) { // GetStandardValues에서 반환된 표준 값 컬렉션이 단독 목록인지 여부를 반환 return false; } public override bool GetStandardValuesSupported(ITypeDescriptorContext context) { // 이 개체가 목록에서 선택할 수 있는 표준 값 집합을 지원하는지 여부를 반환합니다. return true; } public override StandardValuesCollection GetStandardValues(ITypeDescriptorContext context) { // 데이터 형식의 표준 값 컬렉션을 반환합니다. return new StandardValuesCollection(validValues); } } Type Converter 를 이용하여 개체의 Type 변경하기
  • 61. GAT – Gathering Arguments – Type Converter Recipe Framework 이 제공하는 Type Converters Microsoft.Practices.RecipeFramework.Library.Converters.CodeIdentifierStringConverter Microsoft.Practices.RecipeFramework.Library.Converters.DteElementConverter Microsoft.Practices.RecipeFramework.Library.Converters.NamespaceStringConverter Microsoft.Practices.RecipeFramework.Library.Converters.ProjectConverter Microsoft.Practices.RecipeFramework.Library.Converters.ProjectItemConverter Microsoft.Practices.RecipeFramework.Library.Converters.ProjectItemOrEmptyConverter Microsoft.Practices.RecipeFramework.Library.Converters.ProjectOrEmptyConverter Microsoft.Practices.RecipeFramework.Library.Converters.ReferenceConverter Microsoft.Practices.RecipeFramework.Library.Converters.RegexMatchStringConverter Microsoft.Practices.RecipeFramework.Library.Converters.RegexStringNotMatchConverter Microsoft.Practices.RecipeFramework.Library.Converters.SolutionConverter Microsoft.Practices.RecipeFramework.Library.Converters.SolutionFolderConverter Microsoft.Practices.RecipeFramework.Library.Converters.SolutionFolderOrEmptyConverter Microsoft.Practices.RecipeFramework.Library.Converters.SolutionOrEmptyConverter Microsoft.Practices.RecipeFramework.Library.Converters.WebReferenceConverter
  • 62. GAT – Gathering Arguments – Value Provider • Argument 의 값이 특정 개체임을 명시하여(Type Converter), 해당 Value 값을 취득 • Wizard Framework 과 연계, 초기값을 세팅
  • 63. GAT – Gathering Arguments – Value Provider <Argument Name="Param3" Type="DTEObject"> <Converter Type="Microsoft.Practices.RecipeFramework.Library.Converters.SolutionFolderConverter, Microsoft.Practices.RecipeFramework.Library" /> <ValueProvider Type="GATTest.ValueProviders.SolutionValueProvider, GATTest"/> </Argument> public class SolutionValueProvider : ValueProvider { public override bool OnBeginRecipe(object currentValue, out object newValue) { newValue = GetService<EnvDTE.DTE>().Solution.Item(2); return true; } }
  • 64. GAT – Wizard Framework • VSWizard Framework 를 확장한 프레임워크이다 • <GatheringServiceData> 요소 안에 정의한다 • Laid-out 형태의 UI 를 제공한다
  • 65. GAT – Wizard Framework <Recipe Name="Step2"> <Caption>Step 2 - Action2</Caption> <Arguments> <Argument Name="Param1" Type="System.String"/> </Arguments> <GatheringServiceData> <Wizard xmlns="http://schemas.microsoft.com/pag/gax-wizards" SchemaVersion="1.0"> <Pages> <Page> <Title>이름을 입력하세요</Title> <Fields> <Field ValueName="Param1" Label="이름"/> </Fields> </Page> </Pages> </Wizard> </GatheringServiceData> <Actions> <Action Name="UmcAction2" Type="GATTest.Actions.UmcAction2, GATTest"> <Input Name="Param1" RecipeArgument="Param1"/> </Action> </Actions> </Recipe>
  • 66. GAT – Wizard Framework <GatheringServiceData> <Wizard xmlns="http://schemas.microsoft.com/pag/gax-wizards" SchemaVersion="1.0"> <Pages> <Page> <Title>Step 6 - Editor</Title> <Fields> <Field ValueName="CurrentProject" Label="Selection Project"> <Editor Type="Microsoft.Practices.RecipeFramework.Library.Editors.SolutionPickerEditor, Microsoft.Practices.RecipeFramework.Library"/> </Field> </Fields> </Page> </Pages> </Wizard> </GatheringServiceData>
  • 67. GAT – Wizard Framework – Custom Wizard <Page Type="GATTest.CustomWizardPages.DxCustomWizard, GATTest" Width="700" Height="469"> <Title>Custom Wizard</Title> <Fields> <Field ValueName="Param1" Label="Label1" /> </Fields> </Page> public partial class DxCustomWizard : CustomWizardPage { public DxCustomWizard(WizardForm parent) : base(parent) { InitializeComponent(); } [RecipeArgument] public string Param1 { 생략… } private void textBox1_TextChanged(object sender, EventArgs e) { IDictionaryService dictionaryService = GetService(typeof(IDictionaryService)) asIDictionaryService; if (string.IsNullOrEmpty(textBox1.Text.ToString())) dictionaryService.SetValue("Param1", null); else dictionaryService.SetValue("Param1", textBox1.Text.ToString()); } }
  • 68. GAT – Type Alias • 미리 Type 을 지정하여 Alias 로 Type 을 지정한다 <Recipe Name="Step5"> <Types> <TypeAlias Name="DTEObject" Type="EnvDTE.Project, EnvDTE, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"/> </Types> <Arguments> <Argument Name="Param1" Type="DTEObject"> <ValueProvider Type="Microsoft.Practices.RecipeFramework.Library.ValueProviders.FirstSelectedProjec t, Microsoft.Practices.RecipeFramework.Library" /> </Argument> </Arguments> </Recipe>
  • 69. GAT – ETC Elements • <xi:include> – 다른 위치의 XML 파일을 현재의 Configuration 에 포함한다 ex) <xi:include href="TypeAlias.xml" xmlns:xi="http://www.w3.org/2001/XInclude" /> • <OverView> – Guidance Automation Manager 의 Overview 를 표시한다 <Overview Url="http://dotnetxpert.com" /> • <DocumentationLinks> – Recipe 의 참고 문서를 Guidance Navigator Window 에 표시하고, NextStep 문서는 History 에서 탐색할 수 있다 ex) <DocumentationLinks> <Link Caption="A" Url="http://a.com" Kind="Documentation"/> <Link Caption="B" Url="http://b.com" Kind="NextStep"/> </DocumentationLinks>
  • 70. GAT – 개발 Tips – 디버깅 방법 1. 프로젝트 속성의 „시작 외부 프로그램‟ 을 수정한다 2. 프로젝트 속성의 „명령줄 인수‟를 수정한다
  • 71. GAT – 개발 Tips – 디버깅 방법 1. 한번만 Register Guidance Package 를 수정한다 2. Setup Project 를 Unload 해 놓는다 3. 이후부터 Quick Register 로 빌드한다