public static Hash128[] GetArtifactHashes(string[] guids, ImportSyncMode mode = ImportSyncMode.Block) { var _guids = guids.Select(a => new GUID(a)).ToArray(); switch (mode) { case ImportSyncMode.Block: List <Hash128> resultA = new List <Hash128>(); foreach (var g in _guids) { resultA.Add(ProduceArtifact(new ArtifactKey(g)).value); } return(resultA.ToArray()); case ImportSyncMode.Poll: List <Hash128> resultB = new List <Hash128>(); foreach (var g in _guids) { resultB.Add(LookupArtifact(new ArtifactKey(g)).value); } return(resultB.ToArray()); case ImportSyncMode.Queue: return(ProduceArtifactsAsync(_guids, null).Select(a => a.value).ToArray()); } throw new Exception("Invalid ImportSyncMode " + mode); }
public static Hash128 GetArtifactHash(string guid, ImportSyncMode mode = ImportSyncMode.Block) { switch (mode) { case ImportSyncMode.Block: return(ProduceArtifact(new ArtifactKey(new GUID(guid))).value); case ImportSyncMode.Poll: return(LookupArtifact(new ArtifactKey(new GUID(guid))).value); case ImportSyncMode.Queue: return(ProduceArtifactAsync(new ArtifactKey(new GUID(guid))).value); } throw new Exception("Invalid ImportSyncMode " + mode); }
public static Hash128[] GetArtifactHashes(string[] guids, ImportSyncMode mode = ImportSyncMode.Block) { return(GetArtifactHashes_Internal_Guids_SelectImporter(guids, mode)); }
public static Hash128 GetArtifactHash(string guid, [uei.DefaultValue("null")] Type importerType, ImportSyncMode mode = ImportSyncMode.Block) { if (importerType == null) { return(GetArtifactHash_Internal_Guid_SelectImporter(guid, mode)); } else { return(GetArtifactHash_Internal_Guid(guid, importerType, mode)); } }
[uei.ExcludeFromDocs] public static Hash128 GetArtifactHash(string guid, ImportSyncMode mode = ImportSyncMode.Block) { return(GetArtifactHash(guid, null, mode)); }
private extern static Hash128[] GetArtifactHashes_Internal_Guids_SelectImporter(string[] guid, ImportSyncMode mode);
private extern static Hash128 GetArtifactHash_Internal_Guid(string guid, Type importerType, ImportSyncMode mode);
private extern static Hash128 GetArtifactHash_Internal_Guid_SelectImporter(string guid, ImportSyncMode mode);