GeoEco.Metadata.CopyResultMetadata
- GeoEco.Metadata.CopyResultMetadata(fromMethod, fromResultName, toMethod, toResultName, fromClass=None, fromModule=None, toClass=None, toModule=None)
Copies the
ResultMetadatafor a specified return value from one methods’sMethodMetadatato another’s.Use this function to duplicate a
ResultMetadatawhen two classes have an identical or very similar return value. If they are not exactly the same, you can modify the second methods’sResultMetadatafor the return value after it has been copied.- Parameters:
fromMethod (
MethodTypeorstr) – The method or name of the method to copy theResultMetadatafrom. If the name is given, fromClass must also be given.fromResultName (
str) – The name of the return value in fromMethod for which theResultMetadatashould be copied.toMethod (
MethodTypeorstr) – The method or name of the method to copy theResultMetadatato. If the name is given, toClass must also be given.toResultName (
str) – The name of the return value in toMethod that should receive the copiedResultMetadata.fromClass (
typeorstr, optional) – The class containing fromMethod, either as the class itself or the unqualified name of the class (without module or package names). Only needed if fromMethod is given as a name rather than the method itself.fromModule (
ModuleTypeorstr, optional) – The module that contains fromClass, either as the module object itself or the fully qualified name of the module (a.k.a. dotted module name). If not provided, the caller’s module is used.toClass (
typeorstr, optional) – The class containing toMethod, either as the class itself or the unqualified name of the class (without module or package names). Only needed if toMethod is given as a name rather than the method itself.toModule (
ModuleTypeorstr, optional) – The module that contains toClass, either as the module object itself or the fully qualified name of the module (a.k.a. dotted module name). If not provided, the caller’s module is used.
Note
Before calling this function, use
AddResultMetadata()to create aResultMetadatafor fromResultName and add it to theMethodMetadataof fromMethod.