MCPcopy Create free account
hub / github.com/apache/fory / SplitTypeName

Method SplitTypeName

csharp/src/Fory/TypeResolver.cs:296–313  ·  view source on GitHub ↗
(string name)

Source from the content-addressed store, hash-verified

294 }
295
296 internal static (string NamespaceName, string TypeName) SplitTypeName(string name)
297 {
298 ArgumentNullException.ThrowIfNull(name);
299 if (name.Length == 0)
300 {
301 throw new ArgumentException("registration name must not be empty", nameof(name));
302 }
303
304 int separator = name.LastIndexOf('.');
305 if (separator == name.Length - 1)
306 {
307 throw new ArgumentException("registration name must end with a non-empty type name", nameof(name));
308 }
309
310 return separator < 0
311 ? (string.Empty, name)
312 : (name[..separator], name[(separator + 1)..]);
313 }
314
315 internal static void ValidateSplitTypeName(string namespaceName, string typeName)
316 {

Callers 2

RegisterMethod · 0.80
RegisterMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected