當前位置: 首頁>>代碼示例>>C#>>正文


C# AMFWriter.WriteAMF3String方法代碼示例

本文整理匯總了C#中AMFWriter.WriteAMF3String方法的典型用法代碼示例。如果您正苦於以下問題:C# AMFWriter.WriteAMF3String方法的具體用法?C# AMFWriter.WriteAMF3String怎麽用?C# AMFWriter.WriteAMF3String使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在AMFWriter的用法示例。


在下文中一共展示了AMFWriter.WriteAMF3String方法的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.WriteAMF3String(data as string);
		}
開發者ID:Boreeas,項目名稱:LoLNotes,代碼行數:4,代碼來源:AMF3StringWriter.cs

示例3: WriteData

		public void WriteData(AMFWriter writer, object data)
		{
			writer.WriteAMF3String( ((Guid)data).ToString() );
		}
開發者ID:apakian,項目名稱:fluorinefx,代碼行數:4,代碼來源:AMF3GuidWriter.cs

示例4: WriteData

 public void WriteData(AMFWriter writer, object data)
 {
     writer.WriteAMF3String( new String( (char)data, 1)  );
 }
開發者ID:mstaessen,項目名稱:fluorinefx,代碼行數:4,代碼來源:AMF3CharWriter.cs


注:本文中的AMFWriter.WriteAMF3String方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。