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


C# BsonWriter.WriteDouble方法代碼示例

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


在下文中一共展示了BsonWriter.WriteDouble方法的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。

示例1: Serialize

        public override void Serialize(BsonWriter bsonWriter, System.Type nominalType, object value, IBsonSerializationOptions options)
        {
            var rectangle = (Rectangle) value;

            bsonWriter.WriteStartDocument();
            WriteVector(bsonWriter,"Min",rectangle.Min);
            WriteVector(bsonWriter,"Max",rectangle.Max);
            
            bsonWriter.WriteDouble("Width",rectangle.Width);
            bsonWriter.WriteDouble("Height",rectangle.Height);
            bsonWriter.WriteEndDocument();
        }
開發者ID:BernhardGlueck,項目名稱:Phare,代碼行數:12,代碼來源:RectangleBsonSerializer.cs

示例2: Serialize

        /// <summary>
        /// Serializes an object to a BsonWriter.
        /// </summary>
        /// <param name="bsonWriter">The BsonWriter.</param>
        /// <param name="nominalType">The nominal type.</param>
        /// <param name="value">The object.</param>
        /// <param name="options">The serialization options.</param>
        public override void Serialize(BsonWriter bsonWriter, Type nominalType, object value, IBsonSerializationOptions options)
        {
            if (value == null)
            {
                bsonWriter.WriteNull();
            }
            else
            {
                var coordinates = (GeoJson2DCoordinates)value;

                bsonWriter.WriteStartArray();
                bsonWriter.WriteDouble(coordinates.X);
                bsonWriter.WriteDouble(coordinates.Y);
                bsonWriter.WriteEndArray();
            }
        }
開發者ID:Khosrow-Azizi,項目名稱:MasterExperimentV2,代碼行數:23,代碼來源:GeoJson2DCoordinatesSerializer.cs

示例3: Serialize

        /// <summary>
        /// Serializes an object to a BsonWriter.
        /// </summary>
        /// <param name="bsonWriter">The BsonWriter.</param>
        /// <param name="nominalType">The nominal type.</param>
        /// <param name="value">The object.</param>
        /// <param name="options">The serialization options.</param>
        public override void Serialize(BsonWriter bsonWriter, Type nominalType, object value, IBsonSerializationOptions options)
        {
            if (value == null)
            {
                bsonWriter.WriteNull();
            }
            else
            {
                var coordinates = (GeoJson3DProjectedCoordinates)value;

                bsonWriter.WriteStartArray();
                bsonWriter.WriteDouble(coordinates.Easting);
                bsonWriter.WriteDouble(coordinates.Northing);
                bsonWriter.WriteDouble(coordinates.Altitude);
                bsonWriter.WriteEndArray();
            }
        }
開發者ID:jlyonsmith,項目名稱:mongo-csharp-driver,代碼行數:24,代碼來源:GeoJson3DProjectedCoordinatesSerializer.cs

示例4: WriteNullableDouble

        protected void WriteNullableDouble(BsonWriter writer,string name,double? value)
        {
            writer.WriteName(name);

            if ( value != null )
            {
                writer.WriteDouble(value.Value);
            }
            else
            {
                writer.WriteNull();
            }
        }
開發者ID:BernhardGlueck,項目名稱:Phare,代碼行數:13,代碼來源:MongoDbSerializerBase.cs

示例5: Serialize

        public void Serialize(BsonWriter bsonWriter, Type nominalType, object value, IBsonSerializationOptions options)
        {
            var underlyingValue = value.GetType().GetProperty("Value").GetValue(value, null);
            var underlyingValueType = nominalType.GetConceptValueType();
			if (underlyingValueType == typeof(Guid)) {
				var guid = (Guid)underlyingValue;
				var guidAsBytes = guid.ToByteArray ();
				bsonWriter.WriteBinaryData (guidAsBytes, BsonBinarySubType.UuidLegacy, GuidRepresentation.CSharpLegacy);
			} else if (underlyingValueType == typeof(double))
				bsonWriter.WriteDouble ((double)underlyingValue);
			else if (underlyingValueType == typeof(float))
				bsonWriter.WriteDouble ((double)underlyingValue);
			else if (underlyingValueType == typeof(Int32))
				bsonWriter.WriteInt32 ((Int32)underlyingValue);
			else if (underlyingValueType == typeof(Int64))
				bsonWriter.WriteInt64 ((Int64)underlyingValue);
			else if (underlyingValueType == typeof(bool))
				bsonWriter.WriteBoolean ((bool)underlyingValue);
			else if (underlyingValueType == typeof(string))
				bsonWriter.WriteString ((string)(underlyingValue ?? string.Empty));
			else if (underlyingValueType == typeof(decimal))
				bsonWriter.WriteString (underlyingValue.ToString());
        }
開發者ID:jarlef,項目名稱:Bifrost,代碼行數:23,代碼來源:ConceptSerializer.cs

示例6:

 void IBsonSerializable.Serialize(
     BsonWriter bsonWriter,
     Type nominalType,
     IBsonSerializationOptions options
 )
 {
     bsonWriter.WriteStartDocument();
     bsonWriter.WriteDateTime("ts", BsonUtils.ToMillisecondsSinceEpoch(timestamp));
     if (info != null) {
         bsonWriter.WriteString("info", info);
     }
     if (op != null) {
         bsonWriter.WriteString("op", op);
     }
     if (@namespace != null) {
         bsonWriter.WriteString("ns", @namespace);
     }
     if (command != null) {
         bsonWriter.WriteName("command");
         command.WriteTo(bsonWriter);
     }
     if (query != null) {
         bsonWriter.WriteName("query");
         query.WriteTo(bsonWriter);
     }
     if (updateObject != null) {
         bsonWriter.WriteName("updateobj");
         updateObject.WriteTo(bsonWriter);
     }
     if (cursorId != 0) {
         bsonWriter.WriteInt64("cursorid", cursorId);
     }
     if (numberToReturn != 0) {
         bsonWriter.WriteInt32("ntoreturn", numberToReturn);
     }
     if (numberToSkip != 0) {
         bsonWriter.WriteInt32("ntoskip", numberToSkip);
     }
     if (exhaust) {
         bsonWriter.WriteBoolean("exhaust", exhaust);
     }
     if (numberScanned != 0) {
         bsonWriter.WriteInt32("nscanned", numberScanned);
     }
     if (idHack) {
         bsonWriter.WriteBoolean("idhack", idHack);
     }
     if (scanAndOrder) {
         bsonWriter.WriteBoolean("scanAndOrder", scanAndOrder);
     }
     if (moved) {
         bsonWriter.WriteBoolean("moved", moved);
     }
     if (fastMod) {
         bsonWriter.WriteBoolean("fastmod", fastMod);
     }
     if (fastModInsert) {
         bsonWriter.WriteBoolean("fastmodinsert", fastModInsert);
     }
     if (upsert) {
         bsonWriter.WriteBoolean("upsert", upsert);
     }
     if (keyUpdates != 0) {
         bsonWriter.WriteInt32("keyUpdates", keyUpdates);
     }
     if (exception != null) {
         bsonWriter.WriteString("exception", exception);
     }
     if (exceptionCode != 0) {
         bsonWriter.WriteInt32("exceptionCode", exceptionCode);
     }
     if (numberReturned != 0) {
         bsonWriter.WriteInt32("nreturned", numberReturned);
     }
     if (responseLength != 0) {
         bsonWriter.WriteInt32("responseLength", responseLength);
     }
     bsonWriter.WriteDouble("millis", duration.TotalMilliseconds);
     if (client != null) {
         bsonWriter.WriteString("client", client);
     }
     if (user != null) {
         bsonWriter.WriteString("user", user);
     }
     if (error != null) {
         bsonWriter.WriteString("err", error);
     }
     if (abbreviated != null) {
         bsonWriter.WriteString("abbreviated", abbreviated);
     }
     bsonWriter.WriteEndDocument();
 }
開發者ID:vshlos,項目名稱:mongo-csharp-driver,代碼行數:92,代碼來源:SystemProfileInfo.cs

示例7: Serialize

 public override void Serialize(
     BsonWriter bsonWriter,
     Type nominalType,
     object value,
     IBsonSerializationOptions options
 ) {
     var uint16Value = (ushort) value;
     var representation = (options == null) ? BsonType.Int32 : ((RepresentationSerializationOptions) options).Representation;
     switch (representation) {
         case BsonType.Double:
             bsonWriter.WriteDouble(uint16Value);
             break;
         case BsonType.Int32:
             bsonWriter.WriteInt32(uint16Value);
             break;
         case BsonType.Int64:
             bsonWriter.WriteInt64(uint16Value);
             break;
         case BsonType.String:
             bsonWriter.WriteString(XmlConvert.ToString(uint16Value));
             break;
         default:
             var message = string.Format("'{0}' is not a valid representation for type 'UInt16'", representation);
             throw new BsonSerializationException(message);
     }
 }
開發者ID:daniaos,項目名稱:mongo-csharp-driver,代碼行數:26,代碼來源:NetPrimitiveSerializers.cs

示例8: Serialize

 public void Serialize(BsonWriter bsonWriter, Type nominalType, object value, IBsonSerializationOptions options)
 {
     var version = (EventSourceVersion)value;
     var versionAsDouble = version.Combine();
     bsonWriter.WriteDouble(versionAsDouble);
 }
開發者ID:ProCoSys,項目名稱:Bifrost,代碼行數:6,代碼來源:EventSourceVersionSerializer.cs

示例9: Serialize

        /// <summary>
        /// Serializes an object to a BsonWriter.
        /// </summary>
        /// <param name="bsonWriter">The BsonWriter.</param>
        /// <param name="nominalType">The nominal type.</param>
        /// <param name="value">The object.</param>
        /// <param name="options">The serialization options.</param>
        public override void Serialize(
            BsonWriter bsonWriter,
            Type nominalType,
            object value,
            IBsonSerializationOptions options)
        {
            if (value == null)
            {
                throw new ArgumentNullException("value");
            }

            var bsonDouble = (BsonDouble)value;
            bsonWriter.WriteDouble(bsonDouble.Value);
        }
開發者ID:Khosrow-Azizi,項目名稱:MasterExperimentV2,代碼行數:21,代碼來源:BsonDoubleSerializer.cs

示例10: Serialize

 /// <summary>
 /// Serializes an object to a BsonWriter.
 /// </summary>
 /// <param name="bsonWriter">The BsonWriter.</param>
 /// <param name="nominalType">The nominal type.</param>
 /// <param name="value">The object.</param>
 /// <param name="options">The serialization options.</param>
 public override void Serialize(
     BsonWriter bsonWriter,
     Type nominalType,
     object value,
     IBsonSerializationOptions options
 ) {
     var doubleValue = (double) value;
     var representationOptions = (RepresentationSerializationOptions) options ?? defaultRepresentationOptions;
     switch (representationOptions.Representation) {
         case BsonType.Double:
             bsonWriter.WriteDouble(doubleValue);
             break;
         case BsonType.Int32:
             bsonWriter.WriteInt32(representationOptions.ToInt32(doubleValue));
             break;
         case BsonType.Int64:
             bsonWriter.WriteInt64(representationOptions.ToInt64(doubleValue));
             break;
         case BsonType.String:
             bsonWriter.WriteString(XmlConvert.ToString(doubleValue));
             break;
         default:
             var message = string.Format("'{0}' is not a valid representation for type 'Double'", representationOptions.Representation);
             throw new BsonSerializationException(message);
     }
 }
開發者ID:ebix,項目名稱:mongo-csharp-driver,代碼行數:33,代碼來源:BsonPrimitiveSerializers.cs

示例11: Serialize

        /// <summary>
        /// Serializes an object to a BsonWriter.
        /// </summary>
        /// <param name="bsonWriter">The BsonWriter.</param>
        /// <param name="nominalType">The nominal type.</param>
        /// <param name="value">The object.</param>
        /// <param name="options">The serialization options.</param>
        public override void Serialize(
            BsonWriter bsonWriter,
            Type nominalType,
            object value,
            IBsonSerializationOptions options)
        {
            var timeSpan = (TimeSpan)value;

            // support RepresentationSerializationOptions for backward compatibility
            var representationSerializationOptions = options as RepresentationSerializationOptions;
            if (representationSerializationOptions != null)
            {
                options = new TimeSpanSerializationOptions(representationSerializationOptions.Representation);
            }
            var timeSpanSerializationOptions = EnsureSerializationOptions<TimeSpanSerializationOptions>(options);

            if (timeSpanSerializationOptions.Representation == BsonType.String)
            {
                bsonWriter.WriteString(timeSpan.ToString()); // for TimeSpan use .NET's format instead of XmlConvert.ToString
            }
            else if (timeSpanSerializationOptions.Units == TimeSpanUnits.Ticks)
            {
                var ticks = timeSpan.Ticks;
                switch (timeSpanSerializationOptions.Representation)
                {
                    case BsonType.Double: bsonWriter.WriteDouble((double)ticks); break;
                    case BsonType.Int32: bsonWriter.WriteInt32((int)ticks); break;
                    case BsonType.Int64: bsonWriter.WriteInt64(ticks); break;
                    default:
                        var message = string.Format("'{0}' is not a valid TimeSpan representation.", timeSpanSerializationOptions.Representation);
                        throw new BsonSerializationException(message);
                }
            }
            else
            {
                double interval;
                switch (timeSpanSerializationOptions.Units)
                {
                    case TimeSpanUnits.Days: interval = timeSpan.TotalDays; break;
                    case TimeSpanUnits.Hours: interval = timeSpan.TotalHours; break;
                    case TimeSpanUnits.Minutes: interval = timeSpan.TotalMinutes; break;
                    case TimeSpanUnits.Seconds: interval = timeSpan.TotalSeconds; break;
                    case TimeSpanUnits.Milliseconds: interval = timeSpan.TotalMilliseconds; break;
                    case TimeSpanUnits.Nanoseconds: interval = timeSpan.TotalMilliseconds * 1000.0; break;
                    default:
                        var message = string.Format("'{0}' is not a valid TimeSpanUnits value.", timeSpanSerializationOptions.Units);
                        throw new BsonSerializationException(message);
                }

                switch (timeSpanSerializationOptions.Representation)
                {
                    case BsonType.Double: bsonWriter.WriteDouble(interval); break;
                    case BsonType.Int32: bsonWriter.WriteInt32((int)interval); break;
                    case BsonType.Int64: bsonWriter.WriteInt64((long)interval); break;
                    default:
                        var message = string.Format("'{0}' is not a valid TimeSpan representation.", timeSpanSerializationOptions.Representation);
                        throw new BsonSerializationException(message);
                }
            }
        }
開發者ID:abel,項目名稱:sinan,代碼行數:67,代碼來源:NetPrimitiveSerializers.cs

示例12: Serialize

        /// <summary>
        /// Serializes an object to a BsonWriter.
        /// </summary>
        /// <param name="bsonWriter">The BsonWriter.</param>
        /// <param name="nominalType">The nominal type.</param>
        /// <param name="value">The object.</param>
        /// <param name="options">The serialization options.</param>
        public override void Serialize(
            BsonWriter bsonWriter,
            Type nominalType,
            object value,
            IBsonSerializationOptions options)
        {
            var int16Value = (short)value;
            var representationSerializationOptions = EnsureSerializationOptions<RepresentationSerializationOptions>(options);

            switch (representationSerializationOptions.Representation)
            {
                case BsonType.Double:
                    bsonWriter.WriteDouble(representationSerializationOptions.ToDouble(int16Value));
                    break;
                case BsonType.Int32:
                    bsonWriter.WriteInt32(representationSerializationOptions.ToInt32(int16Value));
                    break;
                case BsonType.Int64:
                    bsonWriter.WriteInt64(representationSerializationOptions.ToInt64(int16Value));
                    break;
                case BsonType.String:
                    bsonWriter.WriteString(XmlConvert.ToString(int16Value));
                    break;
                default:
                    var message = string.Format("'{0}' is not a valid Int16 representation.", representationSerializationOptions.Representation);
                    throw new BsonSerializationException(message);
            }
        }
開發者ID:CloudMetal,項目名稱:mongo-csharp-driver,代碼行數:35,代碼來源:Int16Serializer.cs

示例13: Serialize

        /// <summary>
        /// Serializes an object to a BsonWriter.
        /// </summary>
        /// <param name="bsonWriter">The BsonWriter.</param>
        /// <param name="nominalType">The nominal type.</param>
        /// <param name="value">The object.</param>
        /// <param name="options">The serialization options.</param>
        public override void Serialize(
            BsonWriter bsonWriter,
            Type nominalType,
            object value,
            IBsonSerializationOptions options)
        {
            var timeSpan = (TimeSpan)value;

            // support RepresentationSerializationOptions for backward compatibility
            var representationSerializationOptions = options as RepresentationSerializationOptions;
            if (representationSerializationOptions != null)
            {
                options = new TimeSpanSerializationOptions(representationSerializationOptions.Representation);
            }
            var timeSpanSerializationOptions = EnsureSerializationOptions<TimeSpanSerializationOptions>(options);

            switch (timeSpanSerializationOptions.Representation)
            {
                case BsonType.Double:
                    bsonWriter.WriteDouble(ToDouble(timeSpan, timeSpanSerializationOptions.Units));
                    break;
                case BsonType.Int32:
                    bsonWriter.WriteInt32(ToInt32(timeSpan, timeSpanSerializationOptions.Units));
                    break;
                case BsonType.Int64:
                    bsonWriter.WriteInt64(ToInt64(timeSpan, timeSpanSerializationOptions.Units));
                    break;
                case BsonType.String:
                    bsonWriter.WriteString(timeSpan.ToString()); // not XmlConvert.ToString (we're using .NET's format for TimeSpan)
                    break;
                default:
                    var message = string.Format("'{0}' is not a valid TimeSpan representation.", timeSpanSerializationOptions.Representation);
                    throw new BsonSerializationException(message);
            }
        }
開發者ID:robinNode,項目名稱:mongo-csharp-driver,代碼行數:42,代碼來源:TimeSpanSerializer.cs

示例14:

 void IBsonSerializable.Serialize(BsonWriter bsonWriter, Type nominalType, IBsonSerializationOptions options)
 {
     bsonWriter.WriteStartDocument();
     bsonWriter.WriteDateTime("ts", BsonUtils.ToMillisecondsSinceEpoch(_timestamp));
     if (_info != null)
     {
         bsonWriter.WriteString("info", _info);
     }
     if (_op != null)
     {
         bsonWriter.WriteString("op", _op);
     }
     if (_namespace != null)
     {
         bsonWriter.WriteString("ns", _namespace);
     }
     if (_command != null)
     {
         bsonWriter.WriteName("command");
         _command.WriteTo(bsonWriter);
     }
     if (_query != null)
     {
         bsonWriter.WriteName("query");
         _query.WriteTo(bsonWriter);
     }
     if (_updateObject != null)
     {
         bsonWriter.WriteName("updateobj");
         _updateObject.WriteTo(bsonWriter);
     }
     if (_cursorId != 0)
     {
         bsonWriter.WriteInt64("cursorid", _cursorId);
     }
     if (_numberToReturn != 0)
     {
         bsonWriter.WriteInt32("ntoreturn", _numberToReturn);
     }
     if (_numberToSkip != 0)
     {
         bsonWriter.WriteInt32("ntoskip", _numberToSkip);
     }
     if (_exhaust)
     {
         bsonWriter.WriteBoolean("exhaust", _exhaust);
     }
     if (_numberScanned != 0)
     {
         bsonWriter.WriteInt32("nscanned", _numberScanned);
     }
     if (_idHack)
     {
         bsonWriter.WriteBoolean("idhack", _idHack);
     }
     if (_scanAndOrder)
     {
         bsonWriter.WriteBoolean("scanAndOrder", _scanAndOrder);
     }
     if (_moved)
     {
         bsonWriter.WriteBoolean("moved", _moved);
     }
     if (_fastMod)
     {
         bsonWriter.WriteBoolean("fastmod", _fastMod);
     }
     if (_fastModInsert)
     {
         bsonWriter.WriteBoolean("fastmodinsert", _fastModInsert);
     }
     if (_upsert)
     {
         bsonWriter.WriteBoolean("upsert", _upsert);
     }
     if (_keyUpdates != 0)
     {
         bsonWriter.WriteInt32("keyUpdates", _keyUpdates);
     }
     if (_exception != null)
     {
         bsonWriter.WriteString("exception", _exception);
     }
     if (_exceptionCode != 0)
     {
         bsonWriter.WriteInt32("exceptionCode", _exceptionCode);
     }
     if (_numberReturned != 0)
     {
         bsonWriter.WriteInt32("nreturned", _numberReturned);
     }
     if (_responseLength != 0)
     {
         bsonWriter.WriteInt32("responseLength", _responseLength);
     }
     bsonWriter.WriteDouble("millis", _duration.TotalMilliseconds);
     if (_client != null)
     {
         bsonWriter.WriteString("client", _client);
     }
//.........這裏部分代碼省略.........
開發者ID:moonreplace,項目名稱:mongo-csharp-driver,代碼行數:101,代碼來源:SystemProfileInfo.cs

示例15: Serialize


//.........這裏部分代碼省略.........
                }
                if (profileInfo.Command != null)
                {
                    bsonWriter.WriteName("command");
                    profileInfo.Command.WriteTo(bsonWriter);
                }
                if (profileInfo.Query != null)
                {
                    bsonWriter.WriteName("query");
                    profileInfo.Query.WriteTo(bsonWriter);
                }
                if (profileInfo.UpdateObject != null)
                {
                    bsonWriter.WriteName("updateobj");
                    profileInfo.UpdateObject.WriteTo(bsonWriter);
                }
                if (profileInfo.CursorId != 0)
                {
                    bsonWriter.WriteInt64("cursorid", profileInfo.CursorId);
                }
                if (profileInfo.NumberToReturn != 0)
                {
                    bsonWriter.WriteInt32("ntoreturn", profileInfo.NumberToReturn);
                }
                if (profileInfo.NumberToSkip != 0)
                {
                    bsonWriter.WriteInt32("ntoskip", profileInfo.NumberToSkip);
                }
                if (profileInfo.Exhaust)
                {
                    bsonWriter.WriteBoolean("exhaust", profileInfo.Exhaust);
                }
                if (profileInfo.NumberScanned != 0)
                {
                    bsonWriter.WriteInt32("nscanned", profileInfo.NumberScanned);
                }
                if (profileInfo.IdHack)
                {
                    bsonWriter.WriteBoolean("idhack", profileInfo.IdHack);
                }
                if (profileInfo.ScanAndOrder)
                {
                    bsonWriter.WriteBoolean("scanAndOrder", profileInfo.ScanAndOrder);
                }
                if (profileInfo.Moved)
                {
                    bsonWriter.WriteBoolean("moved", profileInfo.Moved);
                }
                if (profileInfo.FastMod)
                {
                    bsonWriter.WriteBoolean("fastmod", profileInfo.FastMod);
                }
                if (profileInfo.FastModInsert)
                {
                    bsonWriter.WriteBoolean("fastmodinsert", profileInfo.FastModInsert);
                }
                if (profileInfo.Upsert)
                {
                    bsonWriter.WriteBoolean("upsert", profileInfo.Upsert);
                }
                if (profileInfo.KeyUpdates != 0)
                {
                    bsonWriter.WriteInt32("keyUpdates", profileInfo.KeyUpdates);
                }
                if (profileInfo.Exception != null)
                {
                    bsonWriter.WriteString("exception", profileInfo.Exception);
                }
                if (profileInfo.ExceptionCode != 0)
                {
                    bsonWriter.WriteInt32("exceptionCode", profileInfo.ExceptionCode);
                }
                if (profileInfo.NumberReturned != 0)
                {
                    bsonWriter.WriteInt32("nreturned", profileInfo.NumberReturned);
                }
                if (profileInfo.ResponseLength != 0)
                {
                    bsonWriter.WriteInt32("responseLength", profileInfo.ResponseLength);
                }
                bsonWriter.WriteDouble("millis", profileInfo.Duration.TotalMilliseconds);
                if (profileInfo.Client != null)
                {
                    bsonWriter.WriteString("client", profileInfo.Client);
                }
                if (profileInfo.User != null)
                {
                    bsonWriter.WriteString("user", profileInfo.User);
                }
                if (profileInfo.Error != null)
                {
                    bsonWriter.WriteString("err", profileInfo.Error);
                }
                if (profileInfo.Abbreviated != null)
                {
                    bsonWriter.WriteString("abbreviated", profileInfo.Abbreviated);
                }
                bsonWriter.WriteEndDocument();
            }
        }
開發者ID:abel,項目名稱:sinan,代碼行數:101,代碼來源:SystemProfileInfo.cs


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