You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
SO HYUN SEOP edited this page Mar 18, 2018
·
3 revisions
기본 형태 블록
publicclassGFile:GModule{[GCommand("{0}에서 {1}로 파일 복사")]publicstaticvoidCopy(stringsource,stringdestination){if(File.Exists(source)){File.Copy(source,destination);}}}
기본적인 모듈의 구조는 위의 코드와 같습니다. GModule 클래스를 상속하여 새로운 클래스를 생성한 다음 자유롭게 정적 메소드를 작성합니다. 그 후 GCommand Attribute 를 추가하여 해당 메소드가 블록으로 변환될 수 있음을 표시합니다. GCommand 에서는 String.Format 함수와 동일하게 입력 받는 인자의 위치를 자유롭게 정의하는 것이 가능합니다.