public void Serialize(global::MongoDB.Bson.IO.BsonWriter bsonWriter, Type nominalType, object value, IBsonSerializationOptions options) { JobDetailImpl item = (JobDetailImpl)value; bsonWriter.WriteStartDocument(); bsonWriter.WriteName("_id"); BsonSerializer.Serialize <JobKey>(bsonWriter, item.Key); bsonWriter.WriteString("_t", "JobDetailImpl"); bsonWriter.WriteString("_assembly", item.JobType.Assembly.FullName); bsonWriter.WriteString("_class", item.JobType.FullName); bsonWriter.WriteString("Name", item.Name); bsonWriter.WriteString("Group", item.Group); bsonWriter.WriteBoolean("RequestRecovery", item.RequestsRecovery); bsonWriter.WriteBoolean("Durable", item.Durable); bsonWriter.WriteName("JobDataMap"); BsonSerializer.Serialize(bsonWriter, item.JobDataMap); /*bsonWriter.WriteName("Description"); * BsonSerializer.Serialize<string>(bsonWriter, item.Description);*/ bsonWriter.WriteEndDocument(); }
public void Serialize(global::MongoDB.Bson.IO.BsonWriter bsonWriter, Type nominalType, object value, IBsonSerializationOptions options) { var item = (JobKey)value; bsonWriter.WriteStartDocument(); bsonWriter.WriteString("Name", item.Name); bsonWriter.WriteString("Group", item.Group); bsonWriter.WriteEndDocument(); }
public void Serialize(global::MongoDB.Bson.IO.BsonWriter bsonWriter, Type nominalType, object value) { TriggerKey item = (TriggerKey)value; bsonWriter.WriteStartDocument(); bsonWriter.WriteString("Name", item.Name); bsonWriter.WriteString("Group", item.Group); bsonWriter.WriteEndDocument(); }
public void Serialize(global::MongoDB.Bson.IO.BsonWriter bsonWriter, Type nominalType, IBsonSerializationOptions options) { bsonWriter.WriteStartDocument(); bsonWriter.WriteString("_id", this.Name); MemoryStream stream = new MemoryStream(); new BinaryFormatter().Serialize(stream, this.Calendar); bsonWriter.WriteBinaryData("ContentStream", stream.ToArray(), BsonBinarySubType.Binary); bsonWriter.WriteEndDocument(); }