TAILIEUCHUNG - Lập trình .net 4.0 và visual studio 2010 part 4

Visual Studio MEF sử dụng một cách gần giống như các ví dụ trước khi nó tải các phần mở rộng Visual Studio. Khi Visual Studio tải đầu tiên, nó xem xét các thư mục mở rộng và tải sẵn phần mở rộng. Bây giờ chúng ta hãy nhìn vào cách các phần mở rộng được tạo ra. | CHAPTER 2 VISUAL STUDIO IDE AND MEF foreach var Part in secure Note that querying a method s metadata is slightly different and that you must instead use the property. What s This All Got to Do with Visual Studio Extensibility Visual Studio utilizes MEF in an almost identical way to the previous examples when it loads Visual Studio extensions. When Visual Studio first loads it examines the extensions directory and loads available extensions. Let s now look into how these extensions are created. Visual Studio Extensibility After you install the Visual Studio customization SDK a number of new extensibility projects are available for you to create. These projects are templates that demonstrate how to perform various hello world type customizations that you can then build on. Figure 2-15 shows these new project types. Figure 2-15. New extensibility projects are available after installing customization SDK. 33 CHAPTER 2 VISUAL STUDIO IDE AND MEF The following extensibility projects are available VSIX Project empty extension that contains just the minimum references needed and a manifest file that describes the extension Editor Margin creates a green box down the bottom of code editor frame Editor Classifier formats types of text a blue color Editor Text Adornment template highlights all instances of the letter a Editor Viewport Adornment template creates a purple box in the top right corner of IDE and a Windows Forms toolbox control Let s take a look at the Editor Margin extensibility project. Editor Margin Open up Visual Studio and create a new Editor Margin project called . 1. Open and note how it utilizes the MEF Export attribute the other attributes contain various bits of metadata utilized by the IDE Export typeof IWpfTextViewMarginProvider Name GreenBar Ensure that the margin occurs below the horizontal scrollbar Order After .

TAILIEUCHUNG - Chia sẻ tài liệu không giới hạn
Địa chỉ : 444 Hoang Hoa Tham, Hanoi, Viet Nam
Website : tailieuchung.com
Email : tailieuchung20@gmail.com
Tailieuchung.com là thư viện tài liệu trực tuyến, nơi chia sẽ trao đổi hàng triệu tài liệu như luận văn đồ án, sách, giáo trình, đề thi.
Chúng tôi không chịu trách nhiệm liên quan đến các vấn đề bản quyền nội dung tài liệu được thành viên tự nguyện đăng tải lên, nếu phát hiện thấy tài liệu xấu hoặc tài liệu có bản quyền xin hãy email cho chúng tôi.
Đã phát hiện trình chặn quảng cáo AdBlock
Trang web này phụ thuộc vào doanh thu từ số lần hiển thị quảng cáo để tồn tại. Vui lòng tắt trình chặn quảng cáo của bạn hoặc tạm dừng tính năng chặn quảng cáo cho trang web này.