public KeyValuePairSerializer(Serializers s, Type type) { getKey = type.DelegateForGetPropertyValue ("Key"); getValue = type.DelegateForGetPropertyValue ("Value"); key = s.FromDeclared (type.GetGenericArguments()[0]); value = s.FromDeclared (type.GetGenericArguments()[1]); newObj = type.DelegateForCreateInstance (type.GetGenericArguments ()); }
internal override string SQL(Serializers.Serializer serializer) { string strSQL = string.Empty; if (pobjTable != null) strSQL += serializer.SerializeTablePrefix(pobjTable) + "."; return strSQL + "*"; }
public StructSerializer (Serializers serializer, Type type) { var properties = type.Properties (Flags.InstancePublic) .Where (n => !serializer.IsIgnored(n)).ToArray (); getters = properties.Select (n => n.DelegateForGetPropertyValue ()).ToArray (); setters = properties.Select (n => n.DelegateForSetPropertyValue ()).ToArray (); this.serializers = properties.Select (n => serializer.FromDeclared (n.PropertyType)).ToArray (); this.newObj = type.DelegateForCreateInstance (); }
public DictionarySerializer(Serializers serializer, Type type) { var elementType = typeof(KeyValuePair<,>).MakeGenericType (type.GetGenericArguments ()); this.ser = serializer.FromDeclared (elementType); this.count = type.DelegateForGetPropertyValue ("Count"); this.add = type.DelegateForSetIndexer (elementType.GetGenericArguments ()); this.newObj = type.DelegateForCreateInstance (); this.key = elementType.DelegateForGetPropertyValue ("Key"); this.value = elementType.DelegateForGetPropertyValue ("Value"); }
public EnumerableSerializer(Serializers serializer, Type type) { var elementType = type.IsGenericType ? type.GetGenericArguments () [0] : typeof(object); this.ser = serializer.FromDeclared (elementType); this.count = type.DelegateForGetPropertyValue ("Count"); var addMethod = type.GetMethods ().First (n => n.Name == "Add" && n.GetParameters().Length == 1); this.add = addMethod.DelegateForCallMethod (); this.newObj = type.DelegateForCreateInstance (); this.classSer = new ClassSerializer (serializer, type); }
/// <summary> /// Generate the necessary parameters /// </summary> public override List <KeyValuePair <string, string> > GetParams() { var p = new List <KeyValuePair <string, string> >(); if (DateCreatedAfter != null) { p.Add(new KeyValuePair <string, string>("DateCreatedAfter", Serializers.DateTimeIso8601(DateCreatedAfter))); } if (DateCreatedBefore != null) { p.Add(new KeyValuePair <string, string>("DateCreatedBefore", Serializers.DateTimeIso8601(DateCreatedBefore))); } if (Track != null) { p.Add(new KeyValuePair <string, string>("Track", Track.ToString())); } if (Publisher != null) { p.Add(new KeyValuePair <string, string>("Publisher", Publisher.ToString())); } if (Kind != null) { p.Add(new KeyValuePair <string, string>("Kind", Kind.ToString())); } if (PageSize != null) { p.Add(new KeyValuePair <string, string>("PageSize", PageSize.ToString())); } return(p); }
/// <summary> /// Generate the necessary parameters /// </summary> public override List <KeyValuePair <string, string> > GetParams() { var p = new List <KeyValuePair <string, string> >(); if (RoomType != null) { p.AddRange(RoomType.Select(prop => new KeyValuePair <string, string>("RoomType", prop.ToString()))); } if (Codec != null) { p.AddRange(Codec.Select(prop => new KeyValuePair <string, string>("Codec", prop.ToString()))); } if (RoomName != null) { p.Add(new KeyValuePair <string, string>("RoomName", RoomName)); } if (CreatedAfter != null) { p.Add(new KeyValuePair <string, string>("CreatedAfter", Serializers.DateTimeIso8601(CreatedAfter))); } if (CreatedBefore != null) { p.Add(new KeyValuePair <string, string>("CreatedBefore", Serializers.DateTimeIso8601(CreatedBefore))); } if (PageSize != null) { p.Add(new KeyValuePair <string, string>("PageSize", PageSize.ToString())); } return(p); }
/// <summary> /// Generate the necessary parameters /// </summary> public List <KeyValuePair <string, string> > GetParams() { var p = new List <KeyValuePair <string, string> >(); if (FriendlyName != null) { p.Add(new KeyValuePair <string, string>("FriendlyName", FriendlyName)); } if (DomainName != null) { p.Add(new KeyValuePair <string, string>("DomainName", DomainName)); } if (DisasterRecoveryUrl != null) { p.Add(new KeyValuePair <string, string>("DisasterRecoveryUrl", Serializers.Url(DisasterRecoveryUrl))); } if (DisasterRecoveryMethod != null) { p.Add(new KeyValuePair <string, string>("DisasterRecoveryMethod", DisasterRecoveryMethod.ToString())); } if (Recording != null) { p.Add(new KeyValuePair <string, string>("Recording", Recording)); } if (Secure != null) { p.Add(new KeyValuePair <string, string>("Secure", Secure.Value.ToString().ToLower())); } return(p); }
/// <summary> /// Generate the necessary parameters /// </summary> public List <KeyValuePair <string, string> > GetParams() { var p = new List <KeyValuePair <string, string> >(); if (PhoneNumber != null) { p.Add(new KeyValuePair <string, string>("PhoneNumber", PhoneNumber.ToString())); } if (FriendlyName != null) { p.Add(new KeyValuePair <string, string>("FriendlyName", FriendlyName)); } if (CallDelay != null) { p.Add(new KeyValuePair <string, string>("CallDelay", CallDelay.ToString())); } if (Extension != null) { p.Add(new KeyValuePair <string, string>("Extension", Extension)); } if (StatusCallback != null) { p.Add(new KeyValuePair <string, string>("StatusCallback", Serializers.Url(StatusCallback))); } if (StatusCallbackMethod != null) { p.Add(new KeyValuePair <string, string>("StatusCallbackMethod", StatusCallbackMethod.ToString())); } return(p); }
/// <summary> /// Generate the necessary parameters /// </summary> public List <KeyValuePair <string, string> > GetParams() { var p = new List <KeyValuePair <string, string> >(); if (DateCreated != null) { p.Add(new KeyValuePair <string, string>("DateCreated", Serializers.DateTimeIso8601(DateCreated))); } if (DateUpdated != null) { p.Add(new KeyValuePair <string, string>("DateUpdated", Serializers.DateTimeIso8601(DateUpdated))); } if (Attributes != null) { p.Add(new KeyValuePair <string, string>("Attributes", Attributes)); } if (RoleSid != null) { p.Add(new KeyValuePair <string, string>("RoleSid", RoleSid.ToString())); } if (MessagingBindingProxyAddress != null) { p.Add(new KeyValuePair <string, string>("MessagingBinding.ProxyAddress", MessagingBindingProxyAddress)); } if (MessagingBindingProjectedAddress != null) { p.Add(new KeyValuePair <string, string>("MessagingBinding.ProjectedAddress", MessagingBindingProjectedAddress)); } return(p); }
public static void Start(ApplicationData applicationData) { SelectedIndexes = new List <int>(); _process = new Process(); _process.StartInfo.FileName = GetOutgridViewApplicationLocation(); _process.StartInfo.CreateNoWindow = true; _process.StartInfo.UseShellExecute = false; _process.StartInfo.RedirectStandardInput = true; _process.StartInfo.RedirectStandardOutput = true; _process.StartInfo.RedirectStandardError = true; _process.OutputDataReceived += (sender, data) => { if (!string.IsNullOrWhiteSpace(data.Data)) { SelectedIndexes = Serializers.ObjectFromJson <List <int> >(data.Data); } }; _process.ErrorDataReceived += (sender, data) => { Console.WriteLine(data.Data); }; _process.Start(); _process.BeginOutputReadLine(); _process.BeginErrorReadLine(); var serializedData = Serializers.ObjectToJson(applicationData); _process.StandardInput.WriteLine(serializedData); }
public void DetectCircularDependencyOneNodeHavingMultipleOutgoingEdges() { var a = new Node { Name = "A" }; var b = new Node { Name = "B" }; var c = new Node { Name = "C" }; var d = new Node { Name = "D" }; a.Edges.Add(b); a.Edges.Add(d); b.Edges.Add(c); c.Edges.Add(b); var roots = new Roots(); roots.Entangle(a); var serializers = new Serializers(new SerializerFactory()); var stateMaps = new StateMaps(serializers); var persister = new Persister(new InMemoryStorageEngine(), roots, serializers, stateMaps); persister.DetectSerializeAndPersistChanges(); var circularChain = CircularDependencyDetector.Check(serializers[0], stateMaps, serializers); circularChain.IsCircular.ShouldBeTrue(); circularChain.Path.Count().ShouldBe(3); circularChain.ToString().ShouldBe("B->C->B"); }
public void DetectSelfCircularDependency() { var a = new Node { Name = "A" }; a.Edges.Add(a); var roots = new Roots(); roots.Entangle(a); var serializers = new Serializers(new SerializerFactory()); var stateMaps = new StateMaps(serializers); var persister = new Persister(new InMemoryStorageEngine(), roots, serializers, stateMaps); persister.DetectSerializeAndPersistChanges(); var circularChain = CircularDependencyDetector.Check(serializers[0], stateMaps, serializers); circularChain.IsCircular.ShouldBeTrue(); circularChain.Path.Count().ShouldBe(2); circularChain.ToString().ShouldBe("A->A"); }
/// <summary> /// Generate the necessary parameters /// </summary> public List <KeyValuePair <string, string> > GetParams() { var p = new List <KeyValuePair <string, string> >(); if (FriendlyName != null) { p.Add(new KeyValuePair <string, string>("FriendlyName", FriendlyName)); } if (ApiVersion != null) { p.Add(new KeyValuePair <string, string>("ApiVersion", ApiVersion)); } if (SmsUrl != null) { p.Add(new KeyValuePair <string, string>("SmsUrl", Serializers.Url(SmsUrl))); } if (SmsMethod != null) { p.Add(new KeyValuePair <string, string>("SmsMethod", SmsMethod.ToString())); } if (SmsFallbackUrl != null) { p.Add(new KeyValuePair <string, string>("SmsFallbackUrl", Serializers.Url(SmsFallbackUrl))); } if (SmsFallbackMethod != null) { p.Add(new KeyValuePair <string, string>("SmsFallbackMethod", SmsFallbackMethod.ToString())); } return(p); }
/// <summary> /// Generate the necessary parameters /// </summary> public List <KeyValuePair <string, string> > GetParams() { var p = new List <KeyValuePair <string, string> >(); if (Identity != null) { p.Add(new KeyValuePair <string, string>("Identity", Identity)); } if (MessagingBindingAddress != null) { p.Add(new KeyValuePair <string, string>("MessagingBinding.Address", MessagingBindingAddress)); } if (MessagingBindingProxyAddress != null) { p.Add(new KeyValuePair <string, string>("MessagingBinding.ProxyAddress", MessagingBindingProxyAddress)); } if (DateCreated != null) { p.Add(new KeyValuePair <string, string>("DateCreated", Serializers.DateTimeIso8601(DateCreated))); } if (DateUpdated != null) { p.Add(new KeyValuePair <string, string>("DateUpdated", Serializers.DateTimeIso8601(DateUpdated))); } if (Attributes != null) { p.Add(new KeyValuePair <string, string>("Attributes", Attributes)); } return(p); }
/// <summary> /// Generate the necessary parameters /// </summary> public List <KeyValuePair <string, string> > GetParams() { var p = new List <KeyValuePair <string, string> >(); if (WebhookUrl != null) { p.Add(new KeyValuePair <string, string>("WebhookUrl", Serializers.Url(WebhookUrl))); } if (FriendlyName != null) { p.Add(new KeyValuePair <string, string>("FriendlyName", FriendlyName)); } if (ReachabilityWebhooksEnabled != null) { p.Add(new KeyValuePair <string, string>("ReachabilityWebhooksEnabled", ReachabilityWebhooksEnabled.Value.ToString().ToLower())); } if (AclEnabled != null) { p.Add(new KeyValuePair <string, string>("AclEnabled", AclEnabled.Value.ToString().ToLower())); } if (ReachabilityDebouncingEnabled != null) { p.Add(new KeyValuePair <string, string>("ReachabilityDebouncingEnabled", ReachabilityDebouncingEnabled.Value.ToString().ToLower())); } if (ReachabilityDebouncingWindow != null) { p.Add(new KeyValuePair <string, string>("ReachabilityDebouncingWindow", ReachabilityDebouncingWindow.ToString())); } return(p); }
/// <summary> /// Generate the necessary parameters /// </summary> public List <KeyValuePair <string, string> > GetParams() { var p = new List <KeyValuePair <string, string> >(); if (FriendlyName != null) { p.Add(new KeyValuePair <string, string>("FriendlyName", FriendlyName)); } if (DateCreated != null) { p.Add(new KeyValuePair <string, string>("DateCreated", Serializers.DateTimeIso8601(DateCreated))); } if (DateUpdated != null) { p.Add(new KeyValuePair <string, string>("DateUpdated", Serializers.DateTimeIso8601(DateUpdated))); } if (MessagingServiceSid != null) { p.Add(new KeyValuePair <string, string>("MessagingServiceSid", MessagingServiceSid.ToString())); } if (Attributes != null) { p.Add(new KeyValuePair <string, string>("Attributes", Attributes)); } if (State != null) { p.Add(new KeyValuePair <string, string>("State", State.ToString())); } return(p); }
/// <summary> /// Generate the necessary parameters /// </summary> public List <KeyValuePair <string, string> > GetParams() { var p = new List <KeyValuePair <string, string> >(); if (RecordingStatusCallbackEvent != null) { p.AddRange(RecordingStatusCallbackEvent.Select(prop => new KeyValuePair <string, string>("RecordingStatusCallbackEvent", prop))); } if (RecordingStatusCallback != null) { p.Add(new KeyValuePair <string, string>("RecordingStatusCallback", Serializers.Url(RecordingStatusCallback))); } if (RecordingStatusCallbackMethod != null) { p.Add(new KeyValuePair <string, string>("RecordingStatusCallbackMethod", RecordingStatusCallbackMethod.ToString())); } if (Trim != null) { p.Add(new KeyValuePair <string, string>("Trim", Trim)); } if (RecordingChannels != null) { p.Add(new KeyValuePair <string, string>("RecordingChannels", RecordingChannels)); } if (RecordingTrack != null) { p.Add(new KeyValuePair <string, string>("RecordingTrack", RecordingTrack)); } return(p); }
/// <summary> /// Generate the necessary parameters /// </summary> public List <KeyValuePair <string, string> > GetParams() { var p = new List <KeyValuePair <string, string> >(); if (FriendlyName != null) { p.Add(new KeyValuePair <string, string>("FriendlyName", FriendlyName)); } if (EventCallbackUrl != null) { p.Add(new KeyValuePair <string, string>("EventCallbackUrl", Serializers.Url(EventCallbackUrl))); } if (EventsFilter != null) { p.Add(new KeyValuePair <string, string>("EventsFilter", EventsFilter)); } if (MultiTaskEnabled != null) { p.Add(new KeyValuePair <string, string>("MultiTaskEnabled", MultiTaskEnabled.Value.ToString().ToLower())); } if (Template != null) { p.Add(new KeyValuePair <string, string>("Template", Template)); } if (PrioritizeQueueOrder != null) { p.Add(new KeyValuePair <string, string>("PrioritizeQueueOrder", PrioritizeQueueOrder.ToString())); } return(p); }
/// <summary> /// Generate the necessary parameters /// </summary> public List <KeyValuePair <string, string> > GetParams() { var p = new List <KeyValuePair <string, string> >(); if (Identity != null) { p.Add(new KeyValuePair <string, string>("Identity", Identity)); } if (UserAddress != null) { p.Add(new KeyValuePair <string, string>("UserAddress", UserAddress)); } if (Attributes != null) { p.Add(new KeyValuePair <string, string>("Attributes", Attributes)); } if (TwilioAddress != null) { p.Add(new KeyValuePair <string, string>("TwilioAddress", TwilioAddress)); } if (DateCreated != null) { p.Add(new KeyValuePair <string, string>("DateCreated", Serializers.DateTimeIso8601(DateCreated))); } if (DateUpdated != null) { p.Add(new KeyValuePair <string, string>("DateUpdated", Serializers.DateTimeIso8601(DateUpdated))); } return(p); }
/// <summary> /// Generate the necessary parameters /// </summary> public override List <KeyValuePair <string, string> > GetParams() { var p = new List <KeyValuePair <string, string> >(); if (Status != null) { p.Add(new KeyValuePair <string, string>("Status", Status.ToString())); } if (SourceSid != null) { p.Add(new KeyValuePair <string, string>("SourceSid", SourceSid.ToString())); } if (GroupingSid != null) { p.AddRange(GroupingSid.Select(prop => new KeyValuePair <string, string>("GroupingSid", prop.ToString()))); } if (DateCreatedAfter != null) { p.Add(new KeyValuePair <string, string>("DateCreatedAfter", Serializers.DateTimeIso8601(DateCreatedAfter))); } if (DateCreatedBefore != null) { p.Add(new KeyValuePair <string, string>("DateCreatedBefore", Serializers.DateTimeIso8601(DateCreatedBefore))); } if (PageSize != null) { p.Add(new KeyValuePair <string, string>("PageSize", PageSize.ToString())); } return(p); }
/// <summary> /// Generate the necessary parameters /// </summary> public List <KeyValuePair <string, string> > GetParams() { var p = new List <KeyValuePair <string, string> >(); if (RoleSid != null) { p.Add(new KeyValuePair <string, string>("RoleSid", RoleSid.ToString())); } if (LastConsumedMessageIndex != null) { p.Add(new KeyValuePair <string, string>("LastConsumedMessageIndex", LastConsumedMessageIndex.ToString())); } if (LastConsumptionTimestamp != null) { p.Add(new KeyValuePair <string, string>("LastConsumptionTimestamp", Serializers.DateTimeIso8601(LastConsumptionTimestamp))); } if (DateCreated != null) { p.Add(new KeyValuePair <string, string>("DateCreated", Serializers.DateTimeIso8601(DateCreated))); } if (DateUpdated != null) { p.Add(new KeyValuePair <string, string>("DateUpdated", Serializers.DateTimeIso8601(DateUpdated))); } if (Attributes != null) { p.Add(new KeyValuePair <string, string>("Attributes", Attributes)); } return(p); }
/// <summary> /// Generate the necessary parameters /// </summary> public List <KeyValuePair <string, string> > GetParams() { var p = new List <KeyValuePair <string, string> >(); if (FriendlyName != null) { p.Add(new KeyValuePair <string, string>("FriendlyName", FriendlyName)); } if (LogQueries != null) { p.Add(new KeyValuePair <string, string>("LogQueries", LogQueries.Value.ToString().ToLower())); } if (UniqueName != null) { p.Add(new KeyValuePair <string, string>("UniqueName", UniqueName)); } if (ResponseUrl != null) { p.Add(new KeyValuePair <string, string>("ResponseUrl", Serializers.Url(ResponseUrl))); } if (CallbackUrl != null) { p.Add(new KeyValuePair <string, string>("CallbackUrl", Serializers.Url(CallbackUrl))); } if (CallbackEvents != null) { p.Add(new KeyValuePair <string, string>("CallbackEvents", CallbackEvents)); } return(p); }
/// <summary> /// Generate the necessary parameters /// </summary> public List <KeyValuePair <string, string> > GetParams() { var p = new List <KeyValuePair <string, string> >(); if (Command != null) { p.Add(new KeyValuePair <string, string>("Command", Command)); } if (Sim != null) { p.Add(new KeyValuePair <string, string>("Sim", Sim)); } if (CallbackMethod != null) { p.Add(new KeyValuePair <string, string>("CallbackMethod", CallbackMethod.ToString())); } if (CallbackUrl != null) { p.Add(new KeyValuePair <string, string>("CallbackUrl", Serializers.Url(CallbackUrl))); } if (CommandMode != null) { p.Add(new KeyValuePair <string, string>("CommandMode", CommandMode.ToString())); } if (IncludeSid != null) { p.Add(new KeyValuePair <string, string>("IncludeSid", IncludeSid)); } return(p); }
/// <summary> /// Generate the necessary parameters /// </summary> public List <KeyValuePair <string, string> > GetParams() { var p = new List <KeyValuePair <string, string> >(); if (Author != null) { p.Add(new KeyValuePair <string, string>("Author", Author)); } if (Body != null) { p.Add(new KeyValuePair <string, string>("Body", Body)); } if (DateCreated != null) { p.Add(new KeyValuePair <string, string>("DateCreated", Serializers.DateTimeIso8601(DateCreated))); } if (DateUpdated != null) { p.Add(new KeyValuePair <string, string>("DateUpdated", Serializers.DateTimeIso8601(DateUpdated))); } if (Attributes != null) { p.Add(new KeyValuePair <string, string>("Attributes", Attributes)); } if (MediaSid != null) { p.Add(new KeyValuePair <string, string>("MediaSid", MediaSid.ToString())); } return(p); }
/// <summary> /// Generate the necessary parameters /// </summary> public List <KeyValuePair <string, string> > GetParams() { var p = new List <KeyValuePair <string, string> >(); if (UniqueName != null) { p.Add(new KeyValuePair <string, string>("UniqueName", UniqueName)); } if (DateExpiry != null) { p.Add(new KeyValuePair <string, string>("DateExpiry", Serializers.DateTimeIso8601(DateExpiry))); } if (Ttl != null) { p.Add(new KeyValuePair <string, string>("Ttl", Ttl.Value.ToString())); } if (Mode != null) { p.Add(new KeyValuePair <string, string>("Mode", Mode.ToString())); } if (Status != null) { p.Add(new KeyValuePair <string, string>("Status", Status.ToString())); } if (Participants != null) { p.AddRange(Participants.Select(prop => new KeyValuePair <string, string>("Participants", Serializers.JsonObject(prop)))); } return(p); }
/// <summary> /// Generate the necessary parameters /// </summary> public List <KeyValuePair <string, string> > GetParams() { var p = new List <KeyValuePair <string, string> >(); if (FriendlyName != null) { p.Add(new KeyValuePair <string, string>("FriendlyName", FriendlyName)); } if (AwsCredentialsSid != null) { p.Add(new KeyValuePair <string, string>("AwsCredentialsSid", AwsCredentialsSid.ToString())); } if (EncryptionKeySid != null) { p.Add(new KeyValuePair <string, string>("EncryptionKeySid", EncryptionKeySid.ToString())); } if (AwsS3Url != null) { p.Add(new KeyValuePair <string, string>("AwsS3Url", Serializers.Url(AwsS3Url))); } if (AwsStorageEnabled != null) { p.Add(new KeyValuePair <string, string>("AwsStorageEnabled", AwsStorageEnabled.Value.ToString().ToLower())); } if (EncryptionEnabled != null) { p.Add(new KeyValuePair <string, string>("EncryptionEnabled", EncryptionEnabled.Value.ToString().ToLower())); } return(p); }
/// <summary> /// Generate the necessary parameters /// </summary> public List <KeyValuePair <string, string> > GetParams() { var p = new List <KeyValuePair <string, string> >(); if (UniqueName != null) { p.Add(new KeyValuePair <string, string>("UniqueName", UniqueName)); } if (Status != null) { p.Add(new KeyValuePair <string, string>("Status", Status.ToString())); } if (Fleet != null) { p.Add(new KeyValuePair <string, string>("Fleet", Fleet.ToString())); } if (CallbackUrl != null) { p.Add(new KeyValuePair <string, string>("CallbackUrl", Serializers.Url(CallbackUrl))); } if (CallbackMethod != null) { p.Add(new KeyValuePair <string, string>("CallbackMethod", CallbackMethod.ToString())); } if (AccountSid != null) { p.Add(new KeyValuePair <string, string>("AccountSid", AccountSid.ToString())); } return(p); }
/// <summary> /// Generate the necessary parameters /// </summary> public List <KeyValuePair <string, string> > GetParams() { var p = new List <KeyValuePair <string, string> >(); if (FriendlyName != null) { p.Add(new KeyValuePair <string, string>("FriendlyName", FriendlyName)); } if (UniqueName != null) { p.Add(new KeyValuePair <string, string>("UniqueName", UniqueName)); } if (Attributes != null) { p.Add(new KeyValuePair <string, string>("Attributes", Attributes)); } if (DateCreated != null) { p.Add(new KeyValuePair <string, string>("DateCreated", Serializers.DateTimeIso8601(DateCreated))); } if (DateUpdated != null) { p.Add(new KeyValuePair <string, string>("DateUpdated", Serializers.DateTimeIso8601(DateUpdated))); } if (CreatedBy != null) { p.Add(new KeyValuePair <string, string>("CreatedBy", CreatedBy)); } return(p); }
/// <summary> /// Generate the necessary parameters /// </summary> public List <KeyValuePair <string, string> > GetParams() { var p = new List <KeyValuePair <string, string> >(); if (Minutes != null) { p.Add(new KeyValuePair <string, string>("Minutes", Minutes.Value.ToString())); } if (StartDate != null) { p.Add(new KeyValuePair <string, string>("StartDate", Serializers.DateTimeIso8601(StartDate))); } if (EndDate != null) { p.Add(new KeyValuePair <string, string>("EndDate", Serializers.DateTimeIso8601(EndDate))); } if (TaskQueueSid != null) { p.Add(new KeyValuePair <string, string>("TaskQueueSid", TaskQueueSid.ToString())); } if (TaskQueueName != null) { p.Add(new KeyValuePair <string, string>("TaskQueueName", TaskQueueName)); } if (FriendlyName != null) { p.Add(new KeyValuePair <string, string>("FriendlyName", FriendlyName)); } return(p); }
/// <summary> /// Generate the necessary parameters /// </summary> public List <KeyValuePair <string, string> > GetParams() { var p = new List <KeyValuePair <string, string> >(); if (Muted != null) { p.Add(new KeyValuePair <string, string>("Muted", Muted.Value.ToString().ToLower())); } if (Hold != null) { p.Add(new KeyValuePair <string, string>("Hold", Hold.Value.ToString().ToLower())); } if (HoldUrl != null) { p.Add(new KeyValuePair <string, string>("HoldUrl", Serializers.Url(HoldUrl))); } if (HoldMethod != null) { p.Add(new KeyValuePair <string, string>("HoldMethod", HoldMethod.ToString())); } if (AnnounceUrl != null) { p.Add(new KeyValuePair <string, string>("AnnounceUrl", Serializers.Url(AnnounceUrl))); } if (AnnounceMethod != null) { p.Add(new KeyValuePair <string, string>("AnnounceMethod", AnnounceMethod.ToString())); } return(p); }
/// <summary> /// Generate the necessary parameters /// </summary> public List <KeyValuePair <string, string> > GetParams() { var p = new List <KeyValuePair <string, string> >(); if (Body != null) { p.Add(new KeyValuePair <string, string>("Body", Body)); } if (Attributes != null) { p.Add(new KeyValuePair <string, string>("Attributes", Attributes)); } if (DateCreated != null) { p.Add(new KeyValuePair <string, string>("DateCreated", Serializers.DateTimeIso8601(DateCreated))); } if (DateUpdated != null) { p.Add(new KeyValuePair <string, string>("DateUpdated", Serializers.DateTimeIso8601(DateUpdated))); } if (LastUpdatedBy != null) { p.Add(new KeyValuePair <string, string>("LastUpdatedBy", LastUpdatedBy)); } if (From != null) { p.Add(new KeyValuePair <string, string>("From", From)); } return(p); }
internal override string SQL(Serializers.Serializer serializer) { return serializer.SerializeArithmeticExpression(this); }
internal override string SQL(Serializers.Serializer serializer) { return serializer.SerializeLogicalExpression(this); }
public UnknownTypeSerializer (Serializers serializer, TypeMap type) { this.serializer = serializer; this.map = type; }
internal override string SQL(Serializers.Serializer serializer) { return serializer.SerializeStringContactExpression(this); }
internal override string SQL(Serializers.Serializer serializer) { return serializer.SerializeConditionExpression(this); }
internal override string SQL(Serializers.Serializer serializer) { return serializer.SerializeBitwiseExpression(this); }
internal override string SQL(Serializers.Serializer serializer) { return serializer.SerializeValue(pobjValue); }
internal override string Source(Serializers.Serializer serializer) { return serializer.SerializeSelectTableJoin(this); }
internal abstract string SQL(Serializers.Serializer serializer);
internal override string SQL(Serializers.Serializer serializer) { return serializer.SerializeGetDateFunctionExpression(this); }
public void ImportExport_E2E() { SolutionImportConfig importConfig = new SolutionImportConfig(); importConfig.Solutions.Add( new SolutionImportOptions() { SolutionFilePath = "Success_1_0_0_0_managed.zip", ImportAsync = true, OverrideSameVersion = true, OverwriteUnmanagedCustomizations = true, PublishWorkflows = true, }); importConfig.Solutions.Add( new SolutionImportOptions() { SolutionFilePath = "Success_1_1_0_0_managed.zip", ImportAsync = true, HoldingSolution = true, ApplySolution = true, ApplyAsync = true, OverwriteUnmanagedCustomizations = true, PublishWorkflows = true, }); string importConfigFile = $"{ArtifactsDirectory}\\ImportConfig.json"; Serializers.SaveJson <SolutionImportConfig>( importConfigFile, importConfig); List <SolutionImportResult> results = SolutionManager.ImportSolutions( ArtifactsDirectory, LogsDirectory, importConfig); Assert.IsTrue(results[0].Success); Assert.IsTrue(results[1].Success); //SolutionExportConfig config = new SolutionExportConfig(); //config.Solutions.Add( // new SolutionExportOptions() // { // SolutionName = "Success", // IncludeVersionInName = true, // Managed = true // } // ); //string exportConfigFile = $"{TestContext.TestLogsDir}\\ExportConfig.json"; //Serializers.SaveJson<SolutionExportConfig>( // exportConfigFile, // config); //List<string> exportedFiles = // SolutionManager.ExportSolutions(LogsDirectory, config); //Assert.IsTrue(File.Exists(exportedFiles[0])); }
internal abstract string Source(Serializers.Serializer serializer);
public ArraySerializer(Serializers serializer, Type type) { this.ser = serializer.FromDeclared (type.GetElementType()); this.newObj = type.DelegateForCreateInstance (typeof(int)); this.setter = type.DelegateForSetElement(); }
/// <summary> /// Generate the necessary parameters /// </summary> public List <KeyValuePair <string, string> > GetParams() { var p = new List <KeyValuePair <string, string> >(); if (FactorSid != null) { p.Add(new KeyValuePair <string, string>("FactorSid", FactorSid.ToString())); } if (ExpirationDate != null) { p.Add(new KeyValuePair <string, string>("ExpirationDate", Serializers.DateTimeIso8601(ExpirationDate))); } if (DetailsMessage != null) { p.Add(new KeyValuePair <string, string>("Details.Message", DetailsMessage)); } if (DetailsFields != null) { p.AddRange(DetailsFields.Select(prop => new KeyValuePair <string, string>("Details.Fields", Serializers.JsonObject(prop)))); } if (HiddenDetails != null) { p.Add(new KeyValuePair <string, string>("HiddenDetails", Serializers.JsonObject(HiddenDetails))); } return(p); }
internal override string SQL(Serializers.Serializer serializer) { return serializer.SerializeAggregateExpression(this); }
/// <summary> /// Generate the necessary parameters /// </summary> public List <KeyValuePair <string, string> > GetParams() { var p = new List <KeyValuePair <string, string> >(); if (FriendlyName != null) { p.Add(new KeyValuePair <string, string>("FriendlyName", FriendlyName)); } if (DefaultServiceRoleSid != null) { p.Add(new KeyValuePair <string, string>("DefaultServiceRoleSid", DefaultServiceRoleSid.ToString())); } if (DefaultChannelRoleSid != null) { p.Add(new KeyValuePair <string, string>("DefaultChannelRoleSid", DefaultChannelRoleSid.ToString())); } if (DefaultChannelCreatorRoleSid != null) { p.Add(new KeyValuePair <string, string>("DefaultChannelCreatorRoleSid", DefaultChannelCreatorRoleSid.ToString())); } if (ReadStatusEnabled != null) { p.Add(new KeyValuePair <string, string>("ReadStatusEnabled", ReadStatusEnabled.Value.ToString().ToLower())); } if (ReachabilityEnabled != null) { p.Add(new KeyValuePair <string, string>("ReachabilityEnabled", ReachabilityEnabled.Value.ToString().ToLower())); } if (TypingIndicatorTimeout != null) { p.Add(new KeyValuePair <string, string>("TypingIndicatorTimeout", TypingIndicatorTimeout.Value.ToString())); } if (ConsumptionReportInterval != null) { p.Add(new KeyValuePair <string, string>("ConsumptionReportInterval", ConsumptionReportInterval.Value.ToString())); } if (NotificationsNewMessageEnabled != null) { p.Add(new KeyValuePair <string, string>("Notifications.NewMessage.Enabled", NotificationsNewMessageEnabled.Value.ToString().ToLower())); } if (NotificationsNewMessageTemplate != null) { p.Add(new KeyValuePair <string, string>("Notifications.NewMessage.Template", NotificationsNewMessageTemplate)); } if (NotificationsAddedToChannelEnabled != null) { p.Add(new KeyValuePair <string, string>("Notifications.AddedToChannel.Enabled", NotificationsAddedToChannelEnabled.Value.ToString().ToLower())); } if (NotificationsAddedToChannelTemplate != null) { p.Add(new KeyValuePair <string, string>("Notifications.AddedToChannel.Template", NotificationsAddedToChannelTemplate)); } if (NotificationsRemovedFromChannelEnabled != null) { p.Add(new KeyValuePair <string, string>("Notifications.RemovedFromChannel.Enabled", NotificationsRemovedFromChannelEnabled.Value.ToString().ToLower())); } if (NotificationsRemovedFromChannelTemplate != null) { p.Add(new KeyValuePair <string, string>("Notifications.RemovedFromChannel.Template", NotificationsRemovedFromChannelTemplate)); } if (NotificationsInvitedToChannelEnabled != null) { p.Add(new KeyValuePair <string, string>("Notifications.InvitedToChannel.Enabled", NotificationsInvitedToChannelEnabled.Value.ToString().ToLower())); } if (NotificationsInvitedToChannelTemplate != null) { p.Add(new KeyValuePair <string, string>("Notifications.InvitedToChannel.Template", NotificationsInvitedToChannelTemplate)); } if (PreWebhookUrl != null) { p.Add(new KeyValuePair <string, string>("PreWebhookUrl", Serializers.Url(PreWebhookUrl))); } if (PostWebhookUrl != null) { p.Add(new KeyValuePair <string, string>("PostWebhookUrl", Serializers.Url(PostWebhookUrl))); } if (WebhookMethod != null) { p.Add(new KeyValuePair <string, string>("WebhookMethod", WebhookMethod.ToString())); } if (WebhookFilters != null) { p.AddRange(WebhookFilters.Select(prop => new KeyValuePair <string, string>("WebhookFilters", prop))); } if (WebhooksOnMessageSendUrl != null) { p.Add(new KeyValuePair <string, string>("Webhooks.OnMessageSend.Url", Serializers.Url(WebhooksOnMessageSendUrl))); } if (WebhooksOnMessageSendMethod != null) { p.Add(new KeyValuePair <string, string>("Webhooks.OnMessageSend.Method", WebhooksOnMessageSendMethod.ToString())); } if (WebhooksOnMessageSendFormat != null) { p.Add(new KeyValuePair <string, string>("Webhooks.OnMessageSend.Format", WebhooksOnMessageSendFormat)); } if (WebhooksOnMessageUpdateUrl != null) { p.Add(new KeyValuePair <string, string>("Webhooks.OnMessageUpdate.Url", Serializers.Url(WebhooksOnMessageUpdateUrl))); } if (WebhooksOnMessageUpdateMethod != null) { p.Add(new KeyValuePair <string, string>("Webhooks.OnMessageUpdate.Method", WebhooksOnMessageUpdateMethod.ToString())); } if (WebhooksOnMessageUpdateFormat != null) { p.Add(new KeyValuePair <string, string>("Webhooks.OnMessageUpdate.Format", WebhooksOnMessageUpdateFormat)); } if (WebhooksOnMessageRemoveUrl != null) { p.Add(new KeyValuePair <string, string>("Webhooks.OnMessageRemove.Url", Serializers.Url(WebhooksOnMessageRemoveUrl))); } if (WebhooksOnMessageRemoveMethod != null) { p.Add(new KeyValuePair <string, string>("Webhooks.OnMessageRemove.Method", WebhooksOnMessageRemoveMethod.ToString())); } if (WebhooksOnMessageRemoveFormat != null) { p.Add(new KeyValuePair <string, string>("Webhooks.OnMessageRemove.Format", WebhooksOnMessageRemoveFormat)); } if (WebhooksOnChannelAddUrl != null) { p.Add(new KeyValuePair <string, string>("Webhooks.OnChannelAdd.Url", Serializers.Url(WebhooksOnChannelAddUrl))); } if (WebhooksOnChannelAddMethod != null) { p.Add(new KeyValuePair <string, string>("Webhooks.OnChannelAdd.Method", WebhooksOnChannelAddMethod.ToString())); } if (WebhooksOnChannelAddFormat != null) { p.Add(new KeyValuePair <string, string>("Webhooks.OnChannelAdd.Format", WebhooksOnChannelAddFormat)); } if (WebhooksOnChannelDestroyUrl != null) { p.Add(new KeyValuePair <string, string>("Webhooks.OnChannelDestroy.Url", Serializers.Url(WebhooksOnChannelDestroyUrl))); } if (WebhooksOnChannelDestroyMethod != null) { p.Add(new KeyValuePair <string, string>("Webhooks.OnChannelDestroy.Method", WebhooksOnChannelDestroyMethod.ToString())); } if (WebhooksOnChannelDestroyFormat != null) { p.Add(new KeyValuePair <string, string>("Webhooks.OnChannelDestroy.Format", WebhooksOnChannelDestroyFormat)); } if (WebhooksOnChannelUpdateUrl != null) { p.Add(new KeyValuePair <string, string>("Webhooks.OnChannelUpdate.Url", Serializers.Url(WebhooksOnChannelUpdateUrl))); } if (WebhooksOnChannelUpdateMethod != null) { p.Add(new KeyValuePair <string, string>("Webhooks.OnChannelUpdate.Method", WebhooksOnChannelUpdateMethod.ToString())); } if (WebhooksOnChannelUpdateFormat != null) { p.Add(new KeyValuePair <string, string>("Webhooks.OnChannelUpdate.Format", WebhooksOnChannelUpdateFormat)); } if (WebhooksOnMemberAddUrl != null) { p.Add(new KeyValuePair <string, string>("Webhooks.OnMemberAdd.Url", Serializers.Url(WebhooksOnMemberAddUrl))); } if (WebhooksOnMemberAddMethod != null) { p.Add(new KeyValuePair <string, string>("Webhooks.OnMemberAdd.Method", WebhooksOnMemberAddMethod.ToString())); } if (WebhooksOnMemberAddFormat != null) { p.Add(new KeyValuePair <string, string>("Webhooks.OnMemberAdd.Format", WebhooksOnMemberAddFormat)); } if (WebhooksOnMemberRemoveUrl != null) { p.Add(new KeyValuePair <string, string>("Webhooks.OnMemberRemove.Url", Serializers.Url(WebhooksOnMemberRemoveUrl))); } if (WebhooksOnMemberRemoveMethod != null) { p.Add(new KeyValuePair <string, string>("Webhooks.OnMemberRemove.Method", WebhooksOnMemberRemoveMethod.ToString())); } if (WebhooksOnMemberRemoveFormat != null) { p.Add(new KeyValuePair <string, string>("Webhooks.OnMemberRemove.Format", WebhooksOnMemberRemoveFormat)); } if (WebhooksOnMessageSentUrl != null) { p.Add(new KeyValuePair <string, string>("Webhooks.OnMessageSent.Url", Serializers.Url(WebhooksOnMessageSentUrl))); } if (WebhooksOnMessageSentMethod != null) { p.Add(new KeyValuePair <string, string>("Webhooks.OnMessageSent.Method", WebhooksOnMessageSentMethod.ToString())); } if (WebhooksOnMessageSentFormat != null) { p.Add(new KeyValuePair <string, string>("Webhooks.OnMessageSent.Format", WebhooksOnMessageSentFormat)); } if (WebhooksOnMessageUpdatedUrl != null) { p.Add(new KeyValuePair <string, string>("Webhooks.OnMessageUpdated.Url", Serializers.Url(WebhooksOnMessageUpdatedUrl))); } if (WebhooksOnMessageUpdatedMethod != null) { p.Add(new KeyValuePair <string, string>("Webhooks.OnMessageUpdated.Method", WebhooksOnMessageUpdatedMethod.ToString())); } if (WebhooksOnMessageUpdatedFormat != null) { p.Add(new KeyValuePair <string, string>("Webhooks.OnMessageUpdated.Format", WebhooksOnMessageUpdatedFormat)); } if (WebhooksOnMessageRemovedUrl != null) { p.Add(new KeyValuePair <string, string>("Webhooks.OnMessageRemoved.Url", Serializers.Url(WebhooksOnMessageRemovedUrl))); } if (WebhooksOnMessageRemovedMethod != null) { p.Add(new KeyValuePair <string, string>("Webhooks.OnMessageRemoved.Method", WebhooksOnMessageRemovedMethod.ToString())); } if (WebhooksOnMessageRemovedFormat != null) { p.Add(new KeyValuePair <string, string>("Webhooks.OnMessageRemoved.Format", WebhooksOnMessageRemovedFormat)); } if (WebhooksOnChannelAddedUrl != null) { p.Add(new KeyValuePair <string, string>("Webhooks.OnChannelAdded.Url", Serializers.Url(WebhooksOnChannelAddedUrl))); } if (WebhooksOnChannelAddedMethod != null) { p.Add(new KeyValuePair <string, string>("Webhooks.OnChannelAdded.Method", WebhooksOnChannelAddedMethod.ToString())); } if (WebhooksOnChannelAddedFormat != null) { p.Add(new KeyValuePair <string, string>("Webhooks.OnChannelAdded.Format", WebhooksOnChannelAddedFormat)); } if (WebhooksOnChannelDestroyedUrl != null) { p.Add(new KeyValuePair <string, string>("Webhooks.OnChannelDestroyed.Url", Serializers.Url(WebhooksOnChannelDestroyedUrl))); } if (WebhooksOnChannelDestroyedMethod != null) { p.Add(new KeyValuePair <string, string>("Webhooks.OnChannelDestroyed.Method", WebhooksOnChannelDestroyedMethod.ToString())); } if (WebhooksOnChannelDestroyedFormat != null) { p.Add(new KeyValuePair <string, string>("Webhooks.OnChannelDestroyed.Format", WebhooksOnChannelDestroyedFormat)); } if (WebhooksOnChannelUpdatedUrl != null) { p.Add(new KeyValuePair <string, string>("Webhooks.OnChannelUpdated.Url", Serializers.Url(WebhooksOnChannelUpdatedUrl))); } if (WebhooksOnChannelUpdatedMethod != null) { p.Add(new KeyValuePair <string, string>("Webhooks.OnChannelUpdated.Method", WebhooksOnChannelUpdatedMethod.ToString())); } if (WebhooksOnChannelUpdatedFormat != null) { p.Add(new KeyValuePair <string, string>("Webhooks.OnChannelUpdated.Format", WebhooksOnChannelUpdatedFormat)); } if (WebhooksOnMemberAddedUrl != null) { p.Add(new KeyValuePair <string, string>("Webhooks.OnMemberAdded.Url", Serializers.Url(WebhooksOnMemberAddedUrl))); } if (WebhooksOnMemberAddedMethod != null) { p.Add(new KeyValuePair <string, string>("Webhooks.OnMemberAdded.Method", WebhooksOnMemberAddedMethod.ToString())); } if (WebhooksOnMemberAddedFormat != null) { p.Add(new KeyValuePair <string, string>("Webhooks.OnMemberAdded.Format", WebhooksOnMemberAddedFormat)); } if (WebhooksOnMemberRemovedUrl != null) { p.Add(new KeyValuePair <string, string>("Webhooks.OnMemberRemoved.Url", Serializers.Url(WebhooksOnMemberRemovedUrl))); } if (WebhooksOnMemberRemovedMethod != null) { p.Add(new KeyValuePair <string, string>("Webhooks.OnMemberRemoved.Method", WebhooksOnMemberRemovedMethod.ToString())); } if (WebhooksOnMemberRemovedFormat != null) { p.Add(new KeyValuePair <string, string>("Webhooks.OnMemberRemoved.Format", WebhooksOnMemberRemovedFormat)); } if (LimitsChannelMembers != null) { p.Add(new KeyValuePair <string, string>("Limits.ChannelMembers", LimitsChannelMembers.Value.ToString())); } if (LimitsUserChannels != null) { p.Add(new KeyValuePair <string, string>("Limits.UserChannels", LimitsUserChannels.Value.ToString())); } return(p); }
public EnumSerializer (Serializers s, Type type) { this.type = type; this.underlying = Enum.GetUnderlyingType(type); this.serializer = s.Get(underlying); }