/// <summary> /// Converts the base 64 string representation of a Guid to the equivalent <see cref="Base64Guid" /> object /// with a configurable <see cref="Base64GuidOptionsBuilder" />. /// </summary> /// <param name="encoded">The string to convert.</param> /// <param name="optionsAction">The action to configure the <see cref="Base64GuidOptions" /> for the instance.</param> /// <param name="result"> /// The object that will contain the parsed value. If the method returns true, /// result contains a valid <see cref="Base64Guid" />. If the method returns false, /// result is null. /// </param> /// <returns>true if the parse operation was successful; otherwise false.</returns> public static Boolean TryParse(String encoded, Action <Base64GuidOptionsBuilder> optionsAction, out Base64Guid result) { try { result = new Base64Guid(encoded, optionsAction); return(true); } catch { result = default; return(false); } }
/// <summary> /// Converts the base 64 string representation of a Guid to the equivalent <see cref="Base64Guid" /> object. /// </summary> /// <param name="encoded">The string to convert.</param> /// <param name="result"> /// The object that will contain the parsed value. If the method returns true, /// result contains a valid <see cref="Base64Guid" />. If the method returns false, /// result is null. /// </param> /// <returns>true if the parse operation was successful; otherwise false.</returns> public static Boolean TryParse(String encoded, out Base64Guid result) { try { result = new Base64Guid(encoded); return(true); } catch { result = default; return(false); } }