private IInvokationExpressionEmittable CreateSendSizeExpressionEmitter([NotNull] AttributeData sendSizeAttri) { if (sendSizeAttri == null) { throw new ArgumentNullException(nameof(sendSizeAttri)); } //TODO: If this ever changes we're f****d. PrimitiveSizeType sizeType = InternalEnumExtensions.ParseFull <PrimitiveSizeType>(sendSizeAttri.ConstructorArguments.First().ToCSharpString(), true); return(CreateSendSizeExpressionEmitter(sizeType)); }
private IInvokationExpressionEmittable CreateSendSizeExpressionEmitter([NotNull] AttributeData sendSizeAttri) { if (sendSizeAttri == null) { throw new ArgumentNullException(nameof(sendSizeAttri)); } //TODO: If this ever changes we're f****d. PrimitiveSizeType sizeType = InternalEnumExtensions.ParseFull <PrimitiveSizeType>(sendSizeAttri.ConstructorArguments.First().ToCSharpString(), true); if (ActualType.ElementType.IsPrimitive()) { return(new SendSizePrimitiveArrayInvokationExpressionEmitter(ActualType, Member, sizeType, Mode)); } else { return(new SendSizeComplexArrayInvokationExpressionEmitter(ActualType, Member, sizeType, Mode)); } }
public PolymorphicSerializerImplementationCompilationUnitEmitter([NotNull] INamedTypeSymbol typeSymbol, [NotNull] Compilation compilationUnit) : base(typeSymbol) { CompilationUnit = compilationUnit ?? throw new ArgumentNullException(nameof(compilationUnit)); PolymorphicKeySizeType = InternalEnumExtensions.ParseFull <PrimitiveSizeType>(TypeSymbol.GetAttributeExact <WireDataContractAttribute>().ConstructorArguments.First().ToCSharpString(), true); }