/*++ * * Routine GetFileProperty * * Description: * * This routine retrieves an FSRM property from a given file. * * Arguments: * * FilePath - The file whose property is to be retrieved. * PropertyName - The property to be retrieved * FsrmManager - The IFsrmClassificationManager object to retrieve the property for the file. * * Return value: * * void * * Notes: * * * --*/ static void GetFileProperty( string FilePath, string PropertyName, IFsrmClassificationManager FsrmManager) { // Get the file property IFsrmProperty property_ = FsrmManager.GetFileProperty( FilePath, PropertyName, _FsrmGetFilePropertyOptions.FsrmGetFilePropertyOptions_None ); DisplayProperty(property_); }
/*++ * * Routine EnumerateFileProperties * * Description: * * This routine enumerates all FSRM properties on a file. * * Arguments: * * FilePath - The file whose properties are to be enumerated. * FsrmManager - The IFsrmClassificationManager object to retrieve the properties for the file. * * Return value: * * void * * Notes: * * * --*/ static void EnumerateFileProperties( string FilePath, IFsrmClassificationManager FsrmManager) { IFsrmCollection fsrmCollection; // get the list of properties for a file fsrmCollection = FsrmManager.EnumFileProperties( FilePath, _FsrmGetFilePropertyOptions.FsrmGetFilePropertyOptions_None ); // loop over all the properties in the collection and print each for (int i = 0; i < fsrmCollection.Count; ++i) { IFsrmProperty property_ = (IFsrmProperty)fsrmCollection[i + 1]; Console.WriteLine("Property {0}", i + 1); DisplayProperty(property_); Console.Write("\n"); } }
/*++ * * Routine EnumerateProperties * * Description: * * This routine enumerates FSRM classification properties * * Arguments: * * FsrmManager - An IFsrmClassificationManager to retrieve the properties from. * * Return value: * * void * * Notes: * * * --*/ static void EnumerateProperties( IFsrmClassificationManager FsrmManager) { IFsrmCollection fsrmCollection; // Get the collection of property definition fsrmCollection = FsrmManager.EnumPropertyDefinitions(_FsrmEnumOptions.FsrmEnumOptions_None); // loop over all the properties in the collection printing each one for (int i = 0; i < fsrmCollection.Count; ++i) { // get the variant and convert it into a IFsrmPropertyDefinition IFsrmPropertyDefinition propertyDefinition; propertyDefinition = (IFsrmPropertyDefinition)fsrmCollection[i + 1]; Console.Write("Property {0}\n", 1 + i); DisplayPropertyDefinition(propertyDefinition); Console.WriteLine(""); } }
/*++ Routine GetFileProperty Description: This routine retrieves an FSRM property from a given file. Arguments: FilePath - The file whose property is to be retrieved. PropertyName - The property to be retrieved FsrmManager - The IFsrmClassificationManager object to retrieve the property for the file. Return value: void Notes: --*/ static void GetFileProperty( string FilePath, string PropertyName, IFsrmClassificationManager FsrmManager ) { // Get the file property IFsrmProperty property_ = FsrmManager.GetFileProperty( FilePath, PropertyName, _FsrmGetFilePropertyOptions.FsrmGetFilePropertyOptions_None ); DisplayProperty( property_ ); }
/*++ Routine EnumerateProperties Description: This routine enumerates FSRM classification properties Arguments: FsrmManager - An IFsrmClassificationManager to retrieve the properties from. Return value: void Notes: --*/ static void EnumerateProperties( IFsrmClassificationManager FsrmManager ) { IFsrmCollection fsrmCollection; // Get the collection of property definition fsrmCollection = FsrmManager.EnumPropertyDefinitions( _FsrmEnumOptions.FsrmEnumOptions_None ); // loop over all the properties in the collection printing each one for (int i = 0; i < fsrmCollection.Count; ++i) { // get the variant and convert it into a IFsrmPropertyDefinition IFsrmPropertyDefinition propertyDefinition; propertyDefinition = (IFsrmPropertyDefinition)fsrmCollection[i + 1]; Console.Write( "Property {0}\n", 1 + i ); DisplayPropertyDefinition( propertyDefinition ); Console.WriteLine( "" ); } }
/*++ Routine EnumerateFileProperties Description: This routine enumerates all FSRM properties on a file. Arguments: FilePath - The file whose properties are to be enumerated. FsrmManager - The IFsrmClassificationManager object to retrieve the properties for the file. Return value: void Notes: --*/ static void EnumerateFileProperties( string FilePath, IFsrmClassificationManager FsrmManager ) { IFsrmCollection fsrmCollection; // get the list of properties for a file fsrmCollection = FsrmManager.EnumFileProperties( FilePath, _FsrmGetFilePropertyOptions.FsrmGetFilePropertyOptions_None ); // loop over all the properties in the collection and print each for (int i = 0; i < fsrmCollection.Count; ++i) { IFsrmProperty property_ = (IFsrmProperty)fsrmCollection[i + 1]; Console.WriteLine( "Property {0}", i + 1 ); DisplayProperty( property_ ); Console.Write( "\n" ); } }