当前位置: 首页>>代码示例>>C#>>正文


C# AMFWriter.WriteAMF3Data方法代码示例

本文整理汇总了C#中AMFWriter.WriteAMF3Data方法的典型用法代码示例。如果您正苦于以下问题:C# AMFWriter.WriteAMF3Data方法的具体用法?C# AMFWriter.WriteAMF3Data怎么用?C# AMFWriter.WriteAMF3Data使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在AMFWriter的用法示例。


在下文中一共展示了AMFWriter.WriteAMF3Data方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: WriteData

		public void WriteData(AMFWriter writer, object data) {
			if (data is INullable) {
				if ((data as INullable).IsNull) {
					writer.WriteAMF3Null();
					return;
				}
			}
			if (data is SqlByte) {
				writer.WriteAMF3Data(((SqlByte)data).Value);
				return;
			}
			if (data is SqlInt16) {
				writer.WriteAMF3Data(((SqlInt16)data).Value);
				return;
			}
			if (data is SqlInt32) {
				writer.WriteAMF3Data(((SqlInt32)data).Value);
				return;
			}
			if (data is SqlInt64) {
				writer.WriteAMF3Data(((SqlInt64)data).Value);
				return;
			}
			if (data is SqlSingle) {
				writer.WriteAMF3Data(((SqlSingle)data).Value);
				return;
			}
			if (data is SqlDouble) {
				writer.WriteAMF3Data(((SqlDouble)data).Value);
				return;
			}
			if (data is SqlDecimal) {
				writer.WriteAMF3Data(((SqlDecimal)data).Value);
				return;
			}
			if (data is SqlMoney) {
				writer.WriteAMF3Data(((SqlMoney)data).Value);
				return;
			}
			if (data is SqlDateTime) {
				writer.WriteAMF3Data(((SqlDateTime)data).Value);
				return;
			}
			if (data is SqlString) {
				writer.WriteAMF3String(((SqlString)data).Value);
				return;
			}
			if (data is SqlGuid) {
				writer.WriteAMF3Data(((SqlGuid)data).Value.ToString("D"));
				return;
			}
			if (data is SqlBoolean) {
				writer.WriteAMF3Bool(((SqlBoolean)data).Value);
				return;
			}
			string msg = string.Format("Could not find serializer for type {0}", data.GetType().FullName);
			if (_log.IsErrorEnabled)
				_log.Error(msg);
			throw new FluorineException(msg);
		}
开发者ID:GodLesZ,项目名称:svn-dump,代码行数:60,代码来源:AMF3SqlTypesWriter.cs

示例2: WriteData

		public void WriteData(AMFWriter writer, object data)
		{
			writer.WriteByte(AMF0TypeCode.AMF3Tag);
			writer.WriteAMF3Data(data);
		}
开发者ID:ByteSempai,项目名称:Ubiquitous,代码行数:5,代码来源:AMF0AMF3TagWriter.cs

示例3: StreamMessage

 protected void StreamMessage(IMessage message, HttpResponse response)
 {
     MemoryStream ms = new MemoryStream();
     AMFWriter writer = new AMFWriter(ms);
     writer.UseLegacyCollection = this.IsLegacyCollection;
     writer.UseLegacyThrowable = this.IsLegacyThrowable;
     writer.WriteAMF3Data(message);
     ms.Close();
     byte[] messageBytes = ms.ToArray();
     StreamChunk(messageBytes, response);
 }
开发者ID:Boreeas,项目名称:LoLNotes,代码行数:11,代码来源:StreamingAmfEndpoint.cs

示例4: WriteData

 public void WriteData(AMFWriter writer, object data)
 {
     writer.WriteAMF3Data((data as CacheableObject).Object);
 }
开发者ID:ByteSempai,项目名称:Ubiquitous,代码行数:4,代码来源:AMF3CacheResultWriter.cs


注:本文中的AMFWriter.WriteAMF3Data方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。