public DistributionInfoData(DistributionMode distMode, ClusterActivity clustActivity, PartNodeInfo affectedNode, bool underMaintenance) { _distMode = distMode; _clustActivity = clustActivity; _affectedNode = affectedNode; isUnderMaintenance = underMaintenance; }
public CurvyDistribution(DistributionMode mode, float step, float angle, float minDistance) { Mode = mode; Step = step; MinDistance = minDistance; Angle = angle; }
public CurvyDistribution() { Mode = DistributionMode.Distance; Step = 1f; MinDistance = 0.2f; Angle = 5; }
public DistributionInfoData(DistributionMode distMode, ClusterActivity clustActivity, ManualDistType manDistType, int percentMove, string source, string[] dests) { _distMode = distMode; _clustActivity = clustActivity; _manualDistType = manDistType; _percentToMove = percentMove; _source = source; _destinations = dests; }
public DistributionInfoData(DistributionMode distMode, ClusterActivity clustActivity, ManualDistType manDistType, int percentMove, Address source, Address[] dests) { _distMode = distMode; _clustActivity = clustActivity; _manualDistType = manDistType; _percentToMove = percentMove; _source = source; _destinations = dests; }
// Draw the property inside the given rect public override void OnGUI(Rect position, SerializedProperty property, GUIContent label) { Rect initialPost = position; EditorGUI.BeginProperty(position, label, property); position = EditorGUI.PrefixLabel(position, GUIUtility.GetControlID(FocusType.Passive), label); SerializedProperty modeProperty = property.FindPropertyRelative("mode"); EditorGUI.PropertyField(position, modeProperty, GUIContent.none, true); Rect mainRect = new Rect(initialPost.x, initialPost.y + EditorGUIUtility.singleLineHeight, initialPost.width, EditorGUIUtility.singleLineHeight); EditorGUI.indentLevel += 1; DistributionMode mode = (DistributionMode)modeProperty.intValue; switch (mode) { case DistributionMode.Normal: DisplayMinMax(mainRect, property); Rect normalRect = new Rect(mainRect.x, mainRect.y + EditorGUIUtility.singleLineHeight, mainRect.width, EditorGUIUtility.singleLineHeight); DisplayNormal(normalRect, property); break; case DistributionMode.Slope: DisplayMinMax(mainRect, property); Rect slopeRect = new Rect(mainRect.x, mainRect.y + EditorGUIUtility.singleLineHeight, mainRect.width, EditorGUIUtility.singleLineHeight); DisplaySlope(slopeRect, property); break; case DistributionMode.Curve: DisplayMinMax(mainRect, property); Rect curveRect = new Rect(mainRect.x, mainRect.y + EditorGUIUtility.singleLineHeight, mainRect.width, EditorGUIUtility.singleLineHeight); DisplayCurve(curveRect, property); break; case DistributionMode.Exp: DisplayMinMax(mainRect, property); Rect expRect = new Rect(mainRect.x, mainRect.y + EditorGUIUtility.singleLineHeight, mainRect.width, EditorGUIUtility.singleLineHeight); DisplayExp(expRect, property); break; case DistributionMode.List: DisplayList(mainRect, property); break; default: break; } EditorGUI.indentLevel -= 1; EditorGUI.EndProperty(); }
protected void Parse(string[] args) { WebDriver = new ConfigurationWebDriver(); bool showHelp = false; var optionSet = new OptionSet { { "u|url=", "Starting URL to begin crawling.", v => BaseUrl = v }, // easy config { "q|quiet", "Run quietly with less detailed console logging.", v => Quiet = v != null }, { "ignore-links", "After loading a page Krawlr will not follow links on the page", v => IgnoreLinks = v != null }, { "ignore-guids", "When analysing URLs remove guids as this removes repeat crawling like /items/item/{guid}. Value is yes / no (Default: yes)", v => IgnoreGuids = v != null }, { "max-follow-links=", "Limit the number of pages to crawl. Default: 0 (no limit).", v => MaxPageLinksToFollow = int.Parse(v) }, // Paths { "e|exclude=", "Path to a file with list of routes/keywords in URL to bypass.", v => ExclusionsFilePath = v }, { "i|include=", "Path to a file with a hard list of routes to hit (will follow in order). Use with --no-follow-links false.", v => InclusionsFilePath = v }, { "s|scripts=", "After each page is loaded a script may be executed against the page to manipulate the DOM. Recommended for adding Login support to the crawl.", v => PageScriptsPath = v }, { "o|output=", "Write crawling activity to CSV file with path or write to a SQL Server DB with a connection string.", v => Output = v }, { "metadata=", "When using the DB writer the metadata will be written to the CrawlRun entity.", v => Metadata = v }, // Webdriver { "w|webdriver=", "Define WebDriver to use. Firefox, Chrome, Remote (Default: Firefox)", v => WebDriver.Driver = v }, { "webdriver-proxy", "Using Chrome or Remote should route via Fiddler Core?", v => WebDriver.UseFiddlerProxy = v != null }, { "webdriver-proxy-port", "If WebDriver proxy is engaged define the port to use. (Default: 0 (autoselect))", v => WebDriver.FiddlerProxyPort = int.Parse(v) }, // Mode { "mode=", "Disibution mode use to use: clientserver, server, client (if server & client a running RabbitMQ server is required)", v => DistributionMode = (DistributionMode)Enum.Parse(typeof(DistributionMode), v, true) }, { "h|?|help", "Show this message and exit.", v => showHelp = v != null }, }; List <string> extra = optionSet.Parse(args); if (!BaseUrl.HasValue() && DistributionMode.In(DistributionMode.ClientServer, DistributionMode.Server)) { System.Console.WriteLine("BaseUrl is a required commandline argument to run the app as a Server."); HasError = true; } if (extra.Any()) { HasError = true; System.Console.WriteLine($"The following options are being ignored: {String.Join(", ", extra)}"); } if (showHelp || HasError) { HasError = true; optionSet.WriteOptionDescriptions(System.Console.Out); } }
public override float GetPropertyHeight(SerializedProperty property, GUIContent label) { int lines = 0; SerializedProperty modeProperty = property.FindPropertyRelative("mode"); DistributionMode mode = (DistributionMode)modeProperty.intValue; switch (mode) { case DistributionMode.Normal: lines = 3; break; case DistributionMode.Slope: lines = 3; break; case DistributionMode.Curve: lines = 3; break; case DistributionMode.Exp: lines = 3; break; case DistributionMode.List: SerializedProperty listProp = property.FindPropertyRelative("probabilityList"); lines = listProp.arraySize + 2; break; default: lines = 2; break; } return(EditorGUIUtility.singleLineHeight * lines); }
public DistributionInfoData(DistributionMode distMode, ClusterActivity clustActivity, PartShardInfo affectedShard) { _distMode = distMode; _clustActivity = clustActivity; _affectedShard = affectedShard; }
public DistributionInfoData(DistributionMode distMode, ClusterActivity clustActivity, PartShardInfo affectedShard, bool needTransfer) : this(distMode, clustActivity, affectedShard) { _needTransfer = needTransfer; }
public DistributionInfoData(DistributionMode distMode, ClusterActivity clustActivity, PartNodeInfo affectedNode) { _distMode = distMode; _clustActivity = clustActivity; _affectedNode = affectedNode; }
public DistributionInfoData(DistributionMode distMode, ClusterActivity clustActivity, PartNodeInfo affectedNode) { _distMode = distMode; _clustActivity = clustActivity; _affectedNode = affectedNode; }