Example #1
0
 public static bool IsPolymorphicReferenceType(this NIType type)
 {
     return(type.IsGenericTypeSpecialization(PolymorphicReferenceGenericType));
 }
Example #2
0
 internal static NIType CreatePanicResult(this NIType type)
 {
     return(SpecializeGenericType(PanicResultGenericType, type));
 }
Example #3
0
 public static NIType CreateSliceMutableIterator(this NIType elementType, NIType lifetimeType)
 {
     return(SpecializeGenericType(SliceMutableIteratorGenericType, elementType, lifetimeType));
 }
Example #4
0
 public static bool TryDestructureMethodCallPromiseType(this NIType type, out NIType outputType)
 {
     return(type.TryGetGenericParameterOfSpecialization(MethodCallPromiseGenericType, 0, out outputType));
 }
Example #5
0
 public static NIType CreateNotifierWriter(this NIType type)
 {
     return(SpecializeGenericType(NotifierWriterGenericType, type));
 }
Example #6
0
 public static bool IsSlice(this NIType type)
 {
     return(IsGenericTypeSpecialization(type, SliceGenericType));
 }
Example #7
0
 public static bool TryDestructureYieldPromiseType(this NIType type, out NIType elementType)
 {
     return(type.TryGetGenericParameterOfSpecialization(YieldPromiseGenericType, 0, out elementType));
 }
Example #8
0
 public static bool IsSharedType(this NIType type)
 {
     return(type.IsGenericTypeSpecialization(SharedGenericType));
 }
Example #9
0
 /// <summary>
 /// If the given <see cref="type"/> is a LockingCell type, outputs the inner value type and returns true; otherwise, returns false.
 /// </summary>
 /// <param name="type">The <see cref="NIType"/> to try to destructure as an LockingCell type.</param>
 /// <param name="valueType">The inner value type of the given type if it is an LockingCell.</param>
 /// <returns>True if the given type was an LockingCell type; false otherwise.</returns>
 public static bool TryDestructureLockingCellType(this NIType type, out NIType valueType)
 {
     return(type.TryGetGenericParameterOfSpecialization(LockingCellGenericType, 0, out valueType));
 }
Example #10
0
 public static bool IsLockingCellType(this NIType type)
 {
     return(type.IsGenericTypeSpecialization(LockingCellGenericType));
 }
Example #11
0
 public static NIType CreateShared(this NIType dereferenceType)
 {
     return(SpecializeGenericType(SharedGenericType, dereferenceType));
 }
Example #12
0
 public static NIType CreateLockingCell(this NIType dereferenceType)
 {
     return(SpecializeGenericType(LockingCellGenericType, dereferenceType));
 }
Example #13
0
 public static bool IsOptionType(this NIType type)
 {
     return(type.IsGenericTypeSpecialization(OptionGenericType));
 }
Example #14
0
 public static NIType CreateOption(this NIType valueType)
 {
     return(SpecializeGenericType(OptionGenericType, valueType));
 }
Example #15
0
 /// <summary>
 /// If the given <see cref="type"/> is a Vector type, outputs the inner value type and returns true; otherwise, returns false.
 /// </summary>
 /// <param name="type">The <see cref="NIType"/> to try to destructure as an Vector type.</param>
 /// <param name="itemType">The inner value type of the given type if it is an Vector.</param>
 /// <returns>True if the given type was an Vector type; false otherwise.</returns>
 public static bool TryDestructureVectorType(this NIType type, out NIType itemType)
 {
     return(type.TryGetGenericParameterOfSpecialization(VectorGenericType, 0, out itemType));
 }
Example #16
0
 /// <summary>
 /// If the given <see cref="type"/> is a Shared type, outputs the inner value type and returns true; otherwise, returns false.
 /// </summary>
 /// <param name="type">The <see cref="NIType"/> to try to destructure as an Shared type.</param>
 /// <param name="valueType">The inner value type of the given type if it is an Shared.</param>
 /// <returns>True if the given type was an Shared type; false otherwise.</returns>
 public static bool TryDestructureSharedType(this NIType type, out NIType valueType)
 {
     return(type.TryGetGenericParameterOfSpecialization(SharedGenericType, 0, out valueType));
 }
Example #17
0
 public static NIType CreateSlice(this NIType elementType)
 {
     return(SpecializeGenericType(SliceGenericType, elementType));
 }
Example #18
0
 public static bool IsIteratorType(this NIType type)
 {
     return(type.IsGenericTypeSpecialization(IteratorInterfaceGenericType));
 }
Example #19
0
 public static NIType CreateYieldPromise(this NIType type)
 {
     return(SpecializeGenericType(YieldPromiseGenericType, type));
 }
Example #20
0
 /// <summary>
 /// If the given <see cref="type"/> is an Iterator type, outputs the inner value type and returns true; otherwise, returns false.
 /// </summary>
 /// <param name="type">The <see cref="NIType"/> to try to destructure as an Iterator type.</param>
 /// <param name="valueType">The inner value type of the given type if it is an Iterator.</param>
 /// <returns>True if the given type was an Iterator type; false otherwise.</returns>
 public static bool TryDestructureIteratorType(this NIType type, out NIType valueType)
 {
     return(type.TryGetGenericParameterOfSpecialization(IteratorInterfaceGenericType, 0, out valueType));
 }
Example #21
0
 public static NIType CreateMethodCallPromise(this NIType type)
 {
     return(SpecializeGenericType(MethodCallPromiseGenericType, type));
 }
Example #22
0
 public static NIType CreateStringSplitIterator(this NIType lifetimeType)
 {
     return(SpecializeGenericType(StringSplitIteratorGenericType, lifetimeType));
 }
Example #23
0
 public static NIType CreateNotifierReaderPromise(this NIType type)
 {
     return(SpecializeGenericType(NotifierReaderPromiseGenericType, type));
 }
Example #24
0
 public static bool IsStringSplitIteratorType(this NIType type)
 {
     return(IsGenericTypeSpecialization(type, StringSplitIteratorGenericType));
 }
Example #25
0
 public static bool TryDestructureNotifierWriterType(this NIType type, out NIType valueType)
 {
     return(type.TryGetGenericParameterOfSpecialization(NotifierWriterGenericType, 0, out valueType));
 }
Example #26
0
 public static NIType CreateVector(this NIType itemType)
 {
     return(SpecializeGenericType(VectorGenericType, itemType));
 }
Example #27
0
 internal static bool TryDestructurePanicResultType(this NIType type, out NIType resultType)
 {
     return(type.TryGetGenericParameterOfSpecialization(PanicResultGenericType, 0, out resultType));
 }
Example #28
0
 public static bool IsVectorType(this NIType type)
 {
     return(type.IsGenericTypeSpecialization(VectorGenericType));
 }
Example #29
0
 public static bool IsSliceMutableIteratorType(this NIType type)
 {
     return(IsGenericTypeSpecialization(type, SliceMutableIteratorGenericType));
 }
Example #30
0
 public static NIType CreatePolymorphicReference(this NIType dereferenceType, NIType lifetimeType, NIType mutabilityType)
 {
     return(SpecializeGenericType(PolymorphicReferenceGenericType, dereferenceType, lifetimeType, mutabilityType));
 }