다음을 통해 공유


ServerDocument.IsCustomized 메서드

지정된 문서에 Visual Studio 2010 Tools for Office Runtime을 사용하여 만든 사용자 지정이 있는지 여부를 나타내는 값을 가져옵니다.

네임스페이스:  Microsoft.VisualStudio.Tools.Applications
어셈블리:  Microsoft.VisualStudio.Tools.Applications.ServerDocument(Microsoft.VisualStudio.Tools.Applications.ServerDocument.dll)

구문

‘선언
Public Shared Function IsCustomized ( _
    documentPath As String _
) As Boolean
public static bool IsCustomized(
    string documentPath
)

매개 변수

  • documentPath
    형식: System.String
    사용자 지정을 확인할 문서의 전체 경로입니다.

반환 값

형식: System.Boolean
문서에 Visual Studio 2010 Tools for Office Runtime을 사용하여 만든 사용자 지정이 있으면 true이고, 문서에 이러한 사용자 지정이 없으면 false입니다.

예외

예외 상황
ArgumentNullException

documentPath 매개 변수가 nullNull 참조(Visual Basic의 경우 Nothing)이거나, 비어 있거나, 모두 공백 문자로 이루어져 있는 경우

FileNotFoundException

documentPath에 파일이 없는 경우

DocumentCustomizedWithPreviousRuntimeException

documentPath로 지정된 파일이 Visual Studio 2010 Tools for Office Runtime 또는 Microsoft Office 시스템(버전 3.0 런타임)용 Visual Studio 도구를 사용하여 만들지 않은 사용자 지정이 있습니다.

설명

이 메서드는 지정된 문서에 Visual Studio 2010 Tools for Office Runtime 또는 Visual Studio Tools for the Microsoft Office System(버전 3.0 Runtime)에서 만들지 않은 사용자 지정이 있을 경우 예외를 throw합니다. 예를 들어, Visual Studio 2008에서 Microsoft Office 2003용 프로젝트 템플릿을 사용하여 만든 문서를 지정하는 경우 이러한 프로젝트 템플릿은 Office Second Edition 런타임용 Visual Studio 2005 도구를 사용하기 때문에 예외가 throw됩니댜ㅏ.

문서에 Visual Studio의 아무 버전이나 사용하여 만든 사용자 지정이 있는지 여부를 확인하려면 IsCustomized 메서드 대신 GetCustomizationVersion 메서드를 사용합니다. GetCustomizationVersion은 문서에 사용자 지정이 있지 않은 경우 0을 반환합니다.

.NET Framework 보안

  • 직접 실행 호출자의 경우 완전히 신뢰합니다. 이 멤버는 부분적으로 신뢰할 수 있는 코드에서 사용할 수 없습니다. 자세한 내용은 부분 신뢰 코드에서 라이브러리 사용을 참조하십시오.

참고 항목

참조

ServerDocument 클래스

Microsoft.VisualStudio.Tools.Applications 네임스페이스