internal RouteTree GetBranch(string route) { RouteTree rt; return(Specific.TryGetValue(route, out rt) ? rt : (Parameter ?? General)); }
public string ToString(IObjectRegistry objects) { return(string.Format( CultureInfo.InvariantCulture, "SNMPv1 TRAP PDU: agent address: {0}; time stamp: {1}; enterprise: {2}; generic: {3}; specific: {4}; varbind count: {5}", AgentAddress, TimeStamp, Enterprise.ToString(objects), Generic, Specific.ToString(CultureInfo.InvariantCulture), Variables.Count.ToString(CultureInfo.InvariantCulture))); }
public async Task TruncateAsync <TEntity>() where TEntity : class { if (UseSqlCommandForTruncate) { await Specific.TruncateOrDeleteAsync <TEntity>(DeleteFromOptions.TruncateDependent | DeleteFromOptions.UseTransaction) .ConfigureAwait(false); } else { ((IDbContext)this).RemoveRange(Set <TEntity>().IgnoreQueryFilters().ToArray()); } }
public void Truncate <TEntity>() where TEntity : class { if (UseSqlCommandForTruncate) { Specific.TruncateOrDelete <TEntity>(DeleteFromOptions.TruncateDependent | DeleteFromOptions.UseTransaction); } else { ((IDbContext)this).RemoveRange(Set <TEntity>().IgnoreQueryFilters().ToArray()); } }
//########################################################################################## //# Public Functions //########################################################################################## ///############################################################ /// <summary> /// Retrieves the requested Renderer configuration value. /// </summary> /// <param name="eSetting">Enumeration representing the required setting value.</param> /// <returns>String representing the requested configuration value.</returns> /// <exception cref="Cn.CnException">Thrown when the passed <paramref>eSetting</paramref> is unreconized.</exception> ///############################################################ /// <LastUpdated>June 18, 2010</LastUpdated> public static string Value(enumSettingValues eSetting) { string sReturn = ""; //#### Determine the value of the passed eSetting, setting our return value accordingly //#### NOTE: We utilize our own property for this so that the Configuration/Internationalization picklsit is initilized if it hasn't already been switch (eSetting) { case enumSettingValues.cnUIDirectoryURL: { // sReturn = "http://" + HttpContext.Current.Request.ServerVariables["Server_Name"] + g_oRendererSettings.Decoder("GeneralSettings", "BaseDirectory") + "/"; //#### Set our sReturn value to the .ProtocolHostPortURL plus the .cnUIDirectory sReturn = Web.Tools.ProtocolHostPortURL() + Specific.AppSettings("CnUIDirectory"); break; } case enumSettingValues.cnUIDirectory: { sReturn = Specific.AppSettings("CnUIDirectory"); break; } case enumSettingValues.cnDOMElementPrefix: { sReturn = Data.Tools.MakeString(Specific.AppSettings("DOMElementPrefix"), g_cDefaultDOMElementPrefix); break; } case enumSettingValues.cnHTMLPageBreak: { sReturn = Data.Tools.MakeString(Specific.AppSettings("HTMLPageBreak"), g_cDefaultHTMLPageBreak); break; } case enumSettingValues.cnCSSClass_PopUpErrorDIV: { sReturn = Data.Tools.MakeString(Specific.AppSettings("CSSClass_PopUpErrorDIV"), g_cDefaultCSSClass_PopUpErrorDIV); break; } case enumSettingValues.cnCSSClass_FormInputError: { sReturn = Data.Tools.MakeString(Specific.AppSettings("CSSClass_FormInputError"), g_cDefaultCSSClass_FormInputError); break; } //#### Else the passed eSetting was unreconized, so raise the error default: { Internationalization.RaiseDefaultError(g_cClassName + "Value", Internationalization.enumInternationalizationValues.cnDeveloperMessages_General_UnknownValue, "eSetting", Data.Tools.MakeString(eSetting, "[?]")); break; } } //#### Return the above determined sReturn value to the caller return(sReturn); }
public override string ToString() { string s = "PSMGeneralization: General: "; if (General != null) { s += General.ToString(); } s += " Specific: "; if (Specific != null) { s += Specific.ToString(); } return(s); }
public override string ToString() { StringBuilder __sb = new StringBuilder("ExecutorStats("); __sb.Append(", Emitted: "); __sb.Append(Emitted); __sb.Append(", Transferred: "); __sb.Append(Transferred); __sb.Append(", Specific: "); __sb.Append(Specific == null ? "<null>" : Specific.ToString()); __sb.Append(", Rate: "); __sb.Append(Rate); __sb.Append(")"); return(__sb.ToString()); }
public MuTestOptions Build() { var muTestOptions = new MuTestOptions { SourceProjectParameter = GetOption(SourceProject.Value(), CliOptions.SourceProject), SourceProjectLibraryParameter = GetOption(SourceLib.Value(), CliOptions.SourceLib), SourceClassParameter = GetOption(SourceClass.Value(), CliOptions.SourceClass), TestProjectParameter = GetOption(TestProject.Value(), CliOptions.TestProject), TestProjectLibraryParameter = GetOption(TestLib.Value(), CliOptions.TestLib), TestClassParameter = GetOption(TestClass.Value(), CliOptions.TestClass), ExecuteAllTests = GetOption(ExecuteAllTests.Value(), CliOptions.ExecuteAllTests), SkipTestProjectBuild = GetOption(SkipTestProjectBuild.Value(), CliOptions.SkipTestProjectBuild), IncludePartialClasses = GetOption(IncludePartialClasses.Value(), CliOptions.IncludePartialClasses), AnalyzeExternalCoveredClasses = GetOption(AnalyzeExternalCoveredClasses.Value(), CliOptions.AnalyzeExternalCoveredClasses), IncludeNestedClasses = GetOption(IncludeNestedClasses.Value(), CliOptions.IncludeNestedClasses), UseClassFilter = GetOption(UseClassFilter.Value(), CliOptions.UseClassFilter), X64TargetPlatform = GetOption(X64.Value(), CliOptions.X64TargetPlatform), BuildInReleaseModeParameter = GetOption(ReleaseMode.Value(), CliOptions.BuildInReleaseMode), EnableDiagnostics = GetOption(Diagnostics.Value(), CliOptions.EnableDiagnostics), OptimizeTestProject = GetOption(OptimizeTestProject.Value(), CliOptions.OptimizeTestProject), ConcurrentTestRunners = GetOption(Parallel.Value(), CliOptions.Parallel), SurvivedThreshold = GetOption(SurvivedThreshold.Value(), CliOptions.SurvivedThreshold), KilledThreshold = GetOption(KilledThreshold.Value(), CliOptions.KilledThreshold), OutputPathParameter = GetOption(OutputPath.Value(), CliOptions.OutputPath), NoCoverage = GetOption(NoCoverage.Value(), CliOptions.NoCoverage), RegEx = GetOption(RegEx.Value(), CliOptions.Regex), Specific = GetOption(Specific.Value(), CliOptions.Specific), ClassName = GetOption(ClassName.Value(), CliOptions.ClassName), ProcessWholeProject = GetOption(ProcessWholeProject.Value(), CliOptions.ProcessWholeProject), TestExecutionThreshold = GetOption(FindTestTime.Value(), CliOptions.TestExecutionThreshold), MutantsPerLine = GetOption(MutantsPerLine.Value(), CliOptions.MutantsPerLine) }; muTestOptions .MultipleSourceClasses .AddRange(GetOption(MultipleSourceClasses.Value(), CliOptions.MultipleSourceClasses).Distinct()); muTestOptions .MultipleTestClasses .AddRange(GetOption(MultipleTestClasses.Value(), CliOptions.MultipleTestClasses).Distinct()); muTestOptions.ValidateOptions(); return(muTestOptions); }
internal RouteTree AddBranch(string route) { switch (route) { case "*": return(General ?? (General = new RouteTree(route, this))); case "^": return(Parameter ?? (Parameter = new RouteTree(route, this))); default: RouteTree nr; if (Specific.TryGetValue(route, out nr)) { return(nr); } nr = new RouteTree(route, this); Specific.Add(route, nr); return(nr); } }
public void Write(TProtocol oprot) { TStruct struc = new TStruct("ExecutorStats"); oprot.WriteStructBegin(struc); TField field = new TField(); field.Name = "emitted"; field.Type = TType.Map; field.ID = 1; oprot.WriteFieldBegin(field); { oprot.WriteMapBegin(new TMap(TType.String, TType.Map, Emitted.Count)); foreach (string _iter141 in Emitted.Keys) { oprot.WriteString(_iter141); { oprot.WriteMapBegin(new TMap(TType.String, TType.I64, Emitted[_iter141].Count)); foreach (string _iter142 in Emitted[_iter141].Keys) { oprot.WriteString(_iter142); oprot.WriteI64(Emitted[_iter141][_iter142]); } oprot.WriteMapEnd(); } } oprot.WriteMapEnd(); } oprot.WriteFieldEnd(); field.Name = "transferred"; field.Type = TType.Map; field.ID = 2; oprot.WriteFieldBegin(field); { oprot.WriteMapBegin(new TMap(TType.String, TType.Map, Transferred.Count)); foreach (string _iter143 in Transferred.Keys) { oprot.WriteString(_iter143); { oprot.WriteMapBegin(new TMap(TType.String, TType.I64, Transferred[_iter143].Count)); foreach (string _iter144 in Transferred[_iter143].Keys) { oprot.WriteString(_iter144); oprot.WriteI64(Transferred[_iter143][_iter144]); } oprot.WriteMapEnd(); } } oprot.WriteMapEnd(); } oprot.WriteFieldEnd(); field.Name = "specific"; field.Type = TType.Struct; field.ID = 3; oprot.WriteFieldBegin(field); Specific.Write(oprot); oprot.WriteFieldEnd(); field.Name = "rate"; field.Type = TType.Double; field.ID = 4; oprot.WriteFieldBegin(field); oprot.WriteDouble(Rate); oprot.WriteFieldEnd(); oprot.WriteFieldStop(); oprot.WriteStructEnd(); }
public SnackDetailsPage(string Address) { InitializeComponent(); SPECIFIC = new ObservableCollection <Specific>(); indexClient = new SearchIndexClient(Constants.SearchServiceName, Constants.Index, new SearchCredentials(Constants.QueryApiKey)); BindingContext = this; SPECIFIC.Clear(); SearchParameters sp = new SearchParameters() { SearchMode = SearchMode.All, }; sp.Filter = "Address eq '" + Address + "'"; var response = indexClient.Documents.Search <Specific>("*", sp); SearchResult <Specific> result = response.Results[0]; // foreach (SearchResult<Specific> result in response.Results) // { //SPECIFIC.Add(new Specific //{ var aa = new Specific { Mamaname = result.Document.Mamaname, Snackname = result.Document.Snackname, Address = result.Document.Address, // ImageUrl = result.Document.ImageUrl Tell = result.Document.Tell, Area = result.Document.Area, Wifi = result.Document.Wifi, Karaoke = result.Document.Karaoke, Costume = result.Document.Costume, // GeoLocation = result.Document.GeoLocation, Counter = result.Document.Counter, Box = result.Document.Box, Birthplace = result.Document.Birthplace, Dialect = result.Document.Dialect, Age = result.Document.Age, //Height = result.Document.Height, Shape = result.Document.Shape, Time = result.Document.Time, Dayoff = result.Document.Dayoff, Labour = result.Document.Labour, Menu = result.Document.Menu, HP = result.Document.HP, PaymentSystem = result.Document.PaymentSystem, PaymentMethod = result.Document.PaymentMethod, Description = result.Document.Description, Cost = result.Document.Cost, Introduction = result.Document.Introduction, Coupon1 = result.Document.Coupon1, Coupon2 = result.Document.Coupon2, Coupon3 = result.Document.Coupon3, Reservation = result.Document.Reservation, // }); }; // var obj = JsonConvert.DeserializeObject<Specific>(aa); mamaname.Text = aa.Mamaname; snackname.Text = aa.Snackname; address.Text = aa.Address; introduction.Text = aa.Introduction; paymentsystem.Text = aa.PaymentSystem; paymentmethod.Text = aa.PaymentMethod; number.Text = aa.Tell.ToString(); url.Text = aa.Reservation; var images = new List <string> { "https://pbs.twimg.com/profile_images/493938489067446272/_w64wQ6H.jpeg", "https://pbs.twimg.com/profile_images/493938489067446272/_w64wQ6H.jpeg", "https://pbs.twimg.com/profile_images/493938489067446272/_w64wQ6H.jpeg", "https://pbs.twimg.com/profile_images/493938489067446272/_w64wQ6H.jpeg", }; var tapGesture1 = new TapGestureRecognizer(); tapGesture1.Tapped += (s, e) => OnCall(number.Text); // attache the gesture to your label number.GestureRecognizers.Add(tapGesture1); var tapGesture2 = new TapGestureRecognizer(); tapGesture2.Tapped += (s, e) => OnWebBrowse(); // attache the gesture to your label url.GestureRecognizers.Add(tapGesture2); }
/// <summary> /// SQL-92, page 262<br/> /// Note that setting oracleNullExtension to true will make the query non-compliant /// </summary> private string _ColumnDefinition(ColumnDescription description, ColumnSpecific columnSpecific, Specific specific) { return string.Format( "{0} {1} {2} {3} {4}", nameEscaper(description.column.columnName), //column name description.options.type, //data type | domain name (description.options.defaultValue != null) ? "DEFAULT " + description.options.defaultValue : "", //NOTE possible SQL injection here! //default clause String.Join( " ", Enumerable.Empty<string>() .ConcatScalar(description.options.isNotNull ? "NOT NULL" : ((specific & Specific.OracleNullExtension) == Specific.OracleNullExtension ? "NULL" : null)) .ConcatScalar((columnSpecific & ColumnSpecific.PrimaryKey) == ColumnSpecific.PrimaryKey ? "PRIMARY KEY" : null) .ToArray() ), //column constraint definition "" //collate clause ); }
public static void Test() { Specific obj = Something.func <Specific>(); }
/// <summary> /// SQL-92, page 262<br/> /// Note that setting oracleNullExtension to true will make the query non-compliant /// </summary> private string _ColumnDefinition(ColumnDescription description, ColumnSpecific columnSpecific, Specific specific) { return(string.Format( "{0} {1} {2} {3} {4}", nameEscaper(description.column.columnName), //column name description.options.type, //data type | domain name (description.options.defaultValue != null) ? "DEFAULT " + description.options.defaultValue : "", //NOTE possible SQL injection here! //default clause String.Join( " ", Enumerable.Empty <string>() .ConcatScalar(description.options.isNotNull ? "NOT NULL" : ((specific & Specific.OracleNullExtension) == Specific.OracleNullExtension ? "NULL" : null)) .ConcatScalar((columnSpecific & ColumnSpecific.PrimaryKey) == ColumnSpecific.PrimaryKey ? "PRIMARY KEY" : null) .ToArray() ), //column constraint definition "" //collate clause )); }