public void Serialize(Serialization.IO.CompactWriter writer) { SerializationUtility.SerializeDictionary <string, ShardConfiguration>(_shardConfs, writer); SerializationUtility.SerializeDictionary <string, string>(DeploymentName, writer); SerializationUtility.SerializeList(DeploymentList, writer); writer.Write(HeartbeatInterval); }
public void Serialize(Serialization.IO.CompactWriter writer) { writer.Write(ElectionId); writer.Write(Id); writer.Write(ElectionBasedSequenceId); writer.Write(TimeStamp.Ticks); }
public void Serialize(Serialization.IO.CompactWriter writer) { writer.WriteObject(this.RoleName); writer.WriteObject(this.RoleType); writer.WriteObject(this.RoleLevel); writer.WriteObject(this.Permissions); }
public void Serialize(Serialization.IO.CompactWriter writer) { writer.Write(RequestId); writer.WriteObject(Source); writer.WriteObject(ResponseMessage); writer.WriteObject(this.Error); }
/// <summary> /// Serializa o parâmetro. /// </summary> /// <param name="writer"></param> public void Serialize(Serialization.IO.CompactWriter writer) { writer.Write(Name); writer.Write((int)Direction); writer.Write(Size); writer.Write((int)DbType); if (Value != null) { var valueType = Value.GetType(); object value; if (valueType.IsEnum) { valueType = Enum.GetUnderlyingType(valueType); value = Convert.ChangeType(Value, valueType); } else { value = Value; } writer.Write(true); writer.WriteObject(value); } else { writer.Write(false); } }
/// <summary> /// Serializa os dados. /// </summary> /// <param name="writer"></param> void Serialization.ICompactSerializable.Serialize(Serialization.IO.CompactWriter writer) { writer.Write(this.Type != null); if (this.Type != null) { ((Serialization.ICompactSerializable) this.Type).Serialize(writer); } writer.Write(ContractName); writer.Write(this.ContractType != null); if (this.Type != null) { ((Serialization.ICompactSerializable) this.ContractType).Serialize(writer); } writer.Write(ImportingConstructor); writer.Write((int)CreationPolicy); writer.Write(UseDispatcher); writer.Write(UIContext); writer.Write(this.Metadata != null ? this.Metadata.Count : 0); if (this.Metadata != null) { foreach (var item in Metadata) { writer.Write(item.Key); writer.WriteObject(item.Value); } } }
public void Serialize(Serialization.IO.CompactWriter writer) { writer.WriteObject(this.OperationType); writer.WriteObject(this.Collection); writer.WriteObject(this.Database); writer.WriteObject(this.Query); }
void Serialization.ICompactSerializable.Serialize(Serialization.IO.CompactWriter writer) { writer.Write(Count); foreach (Serialization.ICompactSerializable i in _innerList) { i.Serialize(writer); } }
public void Serialize(Serialization.IO.CompactWriter writer) { writer.WriteObject(this.ResourceId); Common.Util.SerializationUtility.SerializeDictionary <IRole, IRoleInstance>(this.Roles, writer); //writer.WriteObject(this.Roles); Common.Util.SerializationUtility.SerializeList <ResourceId>(this.SubResources, writer); //writer.WriteObject(this.SubResources); }
public void Serialize(Serialization.IO.CompactWriter writer) { writer.Write(_jobIdentifier); writer.Write(rootFolderName); writer.Write(_creationTime); writer.WriteObject(_activeConfig); writer.WriteObject(_executionState); }
public void Serialize(Serialization.IO.CompactWriter writer) { writer.Write(RequestId); writer.WriteObject(ResponseMessage); writer.WriteObject(Source); writer.WriteObject(Exception); writer.WriteObject(ReturnVal); }
/// <summary> /// Serializa o valor. /// </summary> /// <param name="writer"></param> /// <param name="value"></param> private void Serialize(Serialization.IO.CompactWriter writer, object value) { if (value is int) { writer.Write((int)value); } else if (value is short) { writer.Write((short)value); } else if (value is long) { writer.Write((long)value); } else if (value is float) { writer.Write((float)value); } else if (value is string) { writer.Write((string)value); } else if (value is bool) { writer.Write((bool)value); } else if (value is char) { writer.Write((char)value); } else if (value is byte) { writer.Write((byte)value); } else if (value is byte[]) { var buffer = (byte[])value; writer.Write(buffer.Length); writer.Write(buffer); } else if (value is double) { writer.Write((double)value); } else if (value is decimal) { writer.Write((decimal)value); } else if (value is DateTime) { writer.Write((DateTime)value); } else if (value is DateTimeOffset) { writer.Write(((DateTimeOffset)value).Ticks); writer.Write(((DateTimeOffset)value).Offset.Ticks); } }
public void Serialize(Serialization.IO.CompactWriter writer) { writer.Write(_isLastChunk); writer.Write(_readerUID); writer.WriteObject(_documents); writer.Write(_chunkId); writer.Write(_queryString); writer.Write(_doCaching); }
/// <summary> /// Serializa o objeto. /// </summary> /// <param name="writer"></param> public void Serialize(Serialization.IO.CompactWriter writer) { writer.Write(ActionId); writer.Write(Success); writer.Write(AffectedRows); writer.Write(RowVersion); writer.Write(FailureMessage); if (Result != null) { writer.Write(true); writer.WriteObject(Result); } else { writer.Write(false); } if (Parameters != null) { foreach (ICompactSerializable parameter in Parameters) { if (parameter != null) { writer.Write(true); parameter.Serialize(writer); } } } writer.Write(false); foreach (ICompactSerializable action in AlternativeActions) { if (action != null) { writer.Write(true); action.Serialize(writer); } } writer.Write(false); foreach (ICompactSerializable action in BeforeActions) { if (action != null) { writer.Write(true); action.Serialize(writer); } } writer.Write(false); foreach (ICompactSerializable action in AfterActions) { if (action != null) { writer.Write(true); action.Serialize(writer); } } writer.Write(false); }
public void Serialize(Serialization.IO.CompactWriter writer) { writer.Write(RequestId); writer.WriteObject(Message); writer.Write(NoResponse); writer.WriteObject(MethodName); writer.WriteObject(Parameters); writer.Write(Overload); writer.Write(CommandVersion); }
public override void Serialize(Serialization.IO.CompactWriter writer) { writer.Write(Identifier); writer.Write(Message); writer.Write((int)Status); writer.Write(PercentageExecution); writer.Write(MessageTime); writer.Write(StopTime); Common.Util.SerializationUtility.SerializeList <ShardRecoveryJobState>(Details, writer); }
public void Serialize(Serialization.IO.CompactWriter writer) { writer.Write(_filePath); Common.Util.SerializationUtility.SerializeList <string>(FileName, writer); Util.SerializationUtility.SerializeDD <string, string, string[]>(dbCollectionMap, writer); writer.Write(_database); writer.Write(_cluster); writer.Write(_username); writer.Write(_password); }
/// <summary> /// Serializa os dados da instancia. /// </summary> /// <param name="writer"></param> public void Serialize(Serialization.IO.CompactWriter writer) { writer.Write(Uid); writer.Write(CreateTime); writer.Write(_items.Count); foreach (var i in _items) { i.Serialize(writer); } }
public virtual void Serialize(Serialization.IO.CompactWriter writer) { writer.Write(Identifier); writer.Write(Message); writer.WriteObject(Status); writer.Write(PercentageExecution); writer.Write(_entityName); writer.Write(StartTime); writer.Write(SubmissionTime); writer.Write(StopTime); writer.WriteObject(_lastOperationID); writer.Write(_lastFullBackupDate); }
void Serialization.ICompactSerializable.Serialize(Serialization.IO.CompactWriter writer) { if (_typeName == null) { writer.Write((byte)0); } else { writer.Write((byte)1); _typeName.Serialize(writer); } writer.Write(_version); }
public void Serialize(Serialization.IO.CompactWriter writer) { writer.Write((int)_jobType); writer.Write((int)_operation); writer.Write(_identifier); writer.Write(_cluster); writer.Write((int)_executionPreference); writer.Write(_configCluster); writer.Write(_recoveryPath); Util.SerializationUtility.SerializeDictionary <string, string>(_renameMapping, writer); writer.Write(_creationTime); writer.Write(_username); writer.Write(_password); }
/// <summary> /// Serializa os dados. /// </summary> /// <param name="writer"></param> void Serialization.ICompactSerializable.Serialize(Serialization.IO.CompactWriter writer) { writer.Write(Count); foreach (var item in _exports) { if (!(item is Serialization.ICompactSerializable)) { ((Serialization.ICompactSerializable) new Export(item)).Serialize(writer); } else { ((Serialization.ICompactSerializable)item).Serialize(writer); } } }
/// <summary> /// Serializa o objeto. /// </summary> /// <param name="writer"></param> public void Serialize(Serialization.IO.CompactWriter writer) { writer.Write(_expression); if (Parameters != null) { writer.Write(Parameters.Count); foreach (ICompactSerializable parameter in Parameters) { parameter.Serialize(writer); } } else { writer.Write(0); } }
/// <summary> /// Serializa os dados da instancia. /// </summary> /// <param name="writer"></param> public override void Serialize(Serialization.IO.CompactWriter writer) { _typeName.Serialize(writer); var values = GetValues(); writer.Write((short)values.Length); foreach (var i in values) { var type = GetPrimitiveType(i); writer.Write((byte)type); if (type != PrimitiveTypes.Null) { Serialize(writer, i); } } }
public override void Serialize(Serialization.IO.CompactWriter writer) { writer.Write(Identifier); writer.Write(Message); writer.Write((int)Status); writer.Write(PercentageExecution); writer.Write(MessageTime); writer.Write(StopTime); writer.Write(_cluster); writer.Write(_shard); writer.Write(_node); writer.Write((int)_jobType); Common.Util.SerializationUtility.SerializeList <RecoveryJobStateBase>(Detail, writer); writer.WriteObject(_lastOperationID); writer.Write(_lastFullBackupDate); }
public static void SerializeClusteredList <T>(ClusteredList <T> list, Serialization.IO.CompactWriter writer) { if (list == null) { writer.Write(false); return; } else { writer.Write(true); writer.Write(list.Count); for (int i = 0; i < list.Count; i++) { writer.WriteObject(list[i]); } } }
/// <summary> /// serializes dictionary. Incase of empty dictionary a boolean of value= "false" is serialized ; /// else serializes boolean,count and keys,values /// </summary> /// <typeparam name="T"></typeparam> /// <typeparam name="Q"></typeparam> /// <param name="dictionary"></param> /// <param name="writer"></param> public static void SerializeDictionary <K, V>(IDictionary <K, V> dictionary, Serialization.IO.CompactWriter writer) { if (dictionary == null) { writer.Write(false); return; } else { writer.Write(true); writer.Write(dictionary.Count); for (IEnumerator <KeyValuePair <K, V> > i = dictionary.GetEnumerator(); i.MoveNext();) { writer.WriteObject(i.Current.Key); writer.WriteObject(i.Current.Value); } } }
/// <summary> /// serializes dictionary. Incase of empty dictionary a boolean of value= "false" is serialized ; /// else serializes boolean,count and keys,values /// </summary> /// <typeparam name="T"></typeparam> /// <typeparam name="Q"></typeparam> /// <param name="dictionary"></param> /// <param name="writer"></param> public static void SerializeDictionary(IDictionary dictionary, Serialization.IO.CompactWriter writer) { if (dictionary == null) { writer.Write(false); return; } else { writer.Write(true); writer.Write(dictionary.Count); for (IDictionaryEnumerator i = dictionary.GetEnumerator(); i.MoveNext();) { writer.WriteObject(i.Key); writer.WriteObject(i.Value); } } }
public static void SerializeClusteredArray <T>(ClusteredArray <T> array, Serialization.IO.CompactWriter writer) { if (array == null) { writer.Write(false); return; } else { writer.Write(true); writer.Write(array.Length); writer.Write(array.LengthThreshold); for (int i = 0; i < array.Length; i++) { writer.WriteObject(array[i]); } } }
/// <summary> /// Serializa os dados da instancia. /// </summary> /// <param name="writer"></param> void Colosoft.Serialization.ICompactSerializable.Serialize(Serialization.IO.CompactWriter writer) { if (_typeName == null) { writer.Write((byte)0); } else { writer.Write((byte)1); _typeName.Serialize(writer); } writer.Write(_version); var serializable = _result as Colosoft.Serialization.ICompactSerializable; if (serializable == null && _result != null) { var recordEnumerator = _result.GetEnumerator(); if (recordEnumerator.MoveNext()) { var record = recordEnumerator.Current; if (serializable == null) { serializable = new Colosoft.Query.QueryResult(record.Descriptor, new Colosoft.Query.Record[] { record }.Concat(GetRecords(recordEnumerator))); } } } if (serializable != null) { writer.Write((byte)1); serializable.Serialize(writer); } else { writer.Write((byte)0); } }