// // Details // static bool TryGetKey(Type declaredType, out DurableTypeKey key) { var value = declaredType.GetCustomAttribute <DurablePrefixAttribute>()?.Prefix ?? declaredType.Assembly.GetCustomAttribute <DurablePrefixAttribute>()?.Prefix ?? ""; key = DurablePrefix.TryFrom(value, out var prefix) ? DurableTypeKey.From(prefix, TypeName.From(declaredType)) : null; return(key != null); }
static DurableType CreateType(DurablePrefix prefix, Type declaredType) => new DurableType( DurableTypeKey.From(prefix, TypeName.From(declaredType)), declaredType);