public override async Task <IDictionary <string, string> > SaveSetting() { var settings = await base.SaveSetting(); settings[nameof(QuoteCharacter)] = QuoteCharacter; settings[nameof(IgnoreQuotes)] = IgnoreQuotes.ToString(); settings[nameof(IgnoreEmptyLines)] = IgnoreEmptyLines.ToString(); settings[nameof(EscapeCharacter)] = EscapeCharacter; settings[nameof(AllowComments)] = AllowComments.ToString(); settings[nameof(Delimiter)] = Delimiter; settings[nameof(CommentDelimiter)] = CommentDelimiter; return(settings); }
public string CreatePoll() { if (!canCreate) { return(null); } try { Dictionary <string, string> postData = new Dictionary <string, string>(); HttpWebRequest request = (HttpWebRequest)HttpWebRequest.Create("http://strawpoll.de/new?lang=de"); request.UserAgent = "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; .NET CLR 1.0.3705)"; request.Method = "POST"; request.ContentType = "application/x-www-form-urlencoded"; postData.Add("question", Question); for (int i = 0; i < Answers.Length; i++) { postData.Add("a" + i.ToString(), Answers[i]); } postData.Add("ma", MultipleChoice.ToString().ToLower()); postData.Add("co", AllowComments.ToString().ToLower()); postData.Add("lang", "de"); byte[] postBuild = HttpHelper.CreatePostData(postData); request.ContentLength = postBuild.Length; request.GetRequestStream().Write(postBuild, 0, postBuild.Length); string data; HttpWebResponse response = (HttpWebResponse)request.GetResponse(); using (System.IO.StreamReader sr = new System.IO.StreamReader(response.GetResponseStream())) { data = sr.ReadToEnd(); } return(HtmlHelper.getAttribute(HtmlHelper.getElement(HtmlHelper.getElement(data, "<div class=\"sharelinkbox\">"), "<a href="), "href")); } catch { } return(null); }
public bool Equals(ContentTypeDescription input) { if (input == null) { return(false); } return (( CType == input.CType || (CType != null && CType.Equals(input.CType)) ) && ( Name == input.Name || (Name != null && Name.Equals(input.Name)) ) && ( ContentDescription == input.ContentDescription || (ContentDescription != null && ContentDescription.Equals(input.ContentDescription)) ) && ( PreviewImage == input.PreviewImage || (PreviewImage != null && PreviewImage.Equals(input.PreviewImage)) ) && ( Priority == input.Priority || (Priority.Equals(input.Priority)) ) && ( Reminder == input.Reminder || (Reminder != null && Reminder.Equals(input.Reminder)) ) && ( Properties == input.Properties || (Properties != null && Properties.SequenceEqual(input.Properties)) ) && ( TagMetadata == input.TagMetadata || (TagMetadata != null && TagMetadata.SequenceEqual(input.TagMetadata)) ) && ( TagMetadataItems == input.TagMetadataItems || (TagMetadataItems != null && TagMetadataItems.SequenceEqual(input.TagMetadataItems)) ) && ( UsageExamples == input.UsageExamples || (UsageExamples != null && UsageExamples.SequenceEqual(input.UsageExamples)) ) && ( ShowInContentEditor == input.ShowInContentEditor || (ShowInContentEditor != null && ShowInContentEditor.Equals(input.ShowInContentEditor)) ) && ( TypeOf == input.TypeOf || (TypeOf != null && TypeOf.Equals(input.TypeOf)) ) && ( BindIdentifierToProperty == input.BindIdentifierToProperty || (BindIdentifierToProperty != null && BindIdentifierToProperty.Equals(input.BindIdentifierToProperty)) ) && ( BoundRegex == input.BoundRegex || (BoundRegex != null && BoundRegex.Equals(input.BoundRegex)) ) && ( ForceIdentifierBinding == input.ForceIdentifierBinding || (ForceIdentifierBinding != null && ForceIdentifierBinding.Equals(input.ForceIdentifierBinding)) ) && ( AllowComments == input.AllowComments || (AllowComments != null && AllowComments.Equals(input.AllowComments)) ) && ( AutoEnglishPropertyFallback == input.AutoEnglishPropertyFallback || (AutoEnglishPropertyFallback != null && AutoEnglishPropertyFallback.Equals(input.AutoEnglishPropertyFallback)) ) && ( BulkUploadable == input.BulkUploadable || (BulkUploadable != null && BulkUploadable.Equals(input.BulkUploadable)) ) && ( Previews == input.Previews || (Previews != null && Previews.SequenceEqual(input.Previews)) ) && ( SuppressCmsPath == input.SuppressCmsPath || (SuppressCmsPath != null && SuppressCmsPath.Equals(input.SuppressCmsPath)) ) && ( PropertySections == input.PropertySections || (PropertySections != null && PropertySections.SequenceEqual(input.PropertySections)) )); }
public bool Equals(ContentItemPublicContract input) { if (input == null) { return(false); } return (( ContentId == input.ContentId || (ContentId.Equals(input.ContentId)) ) && ( CType == input.CType || (CType != null && CType.Equals(input.CType)) ) && ( CmsPath == input.CmsPath || (CmsPath != null && CmsPath.Equals(input.CmsPath)) ) && ( CreationDate == input.CreationDate || (CreationDate != null && CreationDate.Equals(input.CreationDate)) ) && ( ModifyDate == input.ModifyDate || (ModifyDate != null && ModifyDate.Equals(input.ModifyDate)) ) && ( AllowComments == input.AllowComments || (AllowComments != null && AllowComments.Equals(input.AllowComments)) ) && ( HasAgeGate == input.HasAgeGate || (HasAgeGate != null && HasAgeGate.Equals(input.HasAgeGate)) ) && ( MinimumAge == input.MinimumAge || (MinimumAge.Equals(input.MinimumAge)) ) && ( RatingImagePath == input.RatingImagePath || (RatingImagePath != null && RatingImagePath.Equals(input.RatingImagePath)) ) && ( Author == input.Author || (Author != null && Author.Equals(input.Author)) ) && ( AutoEnglishPropertyFallback == input.AutoEnglishPropertyFallback || (AutoEnglishPropertyFallback != null && AutoEnglishPropertyFallback.Equals(input.AutoEnglishPropertyFallback)) ) && ( Properties == input.Properties || (Properties != null && Properties.SequenceEqual(input.Properties)) ) && ( Representations == input.Representations || (Representations != null && Representations.SequenceEqual(input.Representations)) ) && ( Tags == input.Tags || (Tags != null && Tags.SequenceEqual(input.Tags)) ) && ( CommentSummary == input.CommentSummary || (CommentSummary != null && CommentSummary.Equals(input.CommentSummary)) )); }