Support
Joined: 18 Jul 2005 Posts: 731
|
Posted: Wed Jan 23, 2008 6:18 am Post subject: HOWTO: Create a namespace extension rooted at a file system folder. |
|
|
To create a namespace extension rooted at a file system folder, in the overridden GetNSETargetInfo method, set the FileSystemFolder property of NSETargetInfo to the desired folder path as follows :
[C#]
public override NSETargetInfo GetNSETargetInfo()
{
NSETargetInfo nti = new NSETargetInfo("MyNamespaceExtension", NSETarget.FileSystemFolder,
NSEItemAttributes.Folder
| NSEItemAttributes.HasSubFolder
| NSEItemAttributes.Browsable
| NSEItemAttributes.FileSysAncestor
| NSEItemAttributes.FileSystem
);
nti.FileSystemFolder = <<"Folder path here">>;
...
...
...
return nti;
}
[VB.Net]
Public Overrides Function GetNSETargetInfo() As NSETargetInfo
Dim tempAttrib As NSEItemAttributes
tempAttrib = NSEItemAttributes.Folder _
Or NSEItemAttributes.HasSubFolder _
Or NSEItemAttributes.FileSysAncestor _
Or NSEItemAttributes.FileSystem _
Or NSEItemAttributes.Browsable
Dim nti As NSETargetInfo = New NSETargetInfo("MyNamespaceExtension", _
NSETarget.FileSystemFolder, tempAttrib)
nti.FileSystemFolder = <<"Folder path here">>
...
...
...
Return nti
End Function |
|