public AmfEndpointContext(ServiceEndpoint endpoint) { if (endpoint == null) throw new ArgumentNullException("endpoint"); _contracts = new List<Type>(); ResolveContracts(endpoint); ServiceEndpoint = endpoint; AmfSerializer = new DataContractAmfSerializer(typeof(AmfPacket), _contracts); }
/// <summary> /// Constructor. /// </summary> /// <param name="encodingOptions">AMF encoding options.</param> public AmfEncoder(AmfEncodingOptions encodingOptions) { //Construct the default content type string _contentType = string.Format( "{0}; charset={1}", AmfEncoderFactory.DefaultAmfMediaType, AmfEncoderFactory.DefaultAmfCharSet ); _serializer = new DataContractAmfSerializer(typeof(AmfPacket), encodingOptions); }