Пример #1
0
 def prepare_options_for_resolve_attributes(
         res_opt_source: ResolveOptions) -> ResolveOptions:
     res_opt_copy = res_opt_source.copy()
     # use this whenever we need to keep references pointing at things that were already found. used when 'fixing' references by localizing to a new document
     res_opt_copy._save_resolutions_on_copy = True
     # for debugging help
     # if resOptCopy.map_old_ctx_to_new_ctx:
     #     return None
     res_opt_copy._map_old_ctx_to_new_ctx = OrderedDict(
     )  # Type: Dict['CdmAttributeContext', 'CdmAttributeContext']
     return res_opt_copy
Пример #2
0
 def prepare_options_for_resolve_attributes(
         res_opt_source: ResolveOptions) -> ResolveOptions:
     res_opt_copy = res_opt_source.copy()
     # use this whenever we need to keep references pointing at things that were already found. used when 'fixing' references by localizing to a new document
     res_opt_copy._save_resolutions_on_copy = True
     # for debugging help (Ported from C# written by Jeff)
     # if (resOptCopy.MapOldCtxToNewCtx != null)
     # {
     #     return null;
     # }
     res_opt_copy._map_old_ctx_to_new_ctx = OrderedDict(
     )  # Type: Dict['CdmAttributeContext', 'CdmAttributeContext']
     return res_opt_copy