public static global::Grpc.Core.ServerServiceDefinition BindService(BarBase serviceImpl) { return(global::Grpc.Core.ServerServiceDefinition.CreateBuilder() .AddMethod(Method_ClientStreaming, serviceImpl.ClientStreaming) .AddMethod(Method_ServerStreaming, serviceImpl.ServerStreaming) .AddMethod(Method_DuplexStreaming, serviceImpl.DuplexStreaming) .Build()); }
/// <summary> /// Constructor for deserializing objects /// </summary> /// <param name="info">A <see cref="SerializationInfo"/> instance that defines the serialized data /// </param> /// <param name="context">A <see cref="StreamingContext"/> instance that contains the serialized data /// </param> protected ErrorBarItem(SerializationInfo info, StreamingContext context) : base(info, context) { // The schema value is just a file version parameter. You can use it to make future versions // backwards compatible as new member variables are added to classes int sch = info.GetInt32("schema2"); errorBar = (ErrorBar)info.GetValue("errorBar", typeof(ErrorBar)); barBase = (BarBase)info.GetValue("barBase", typeof(BarBase)); }
public EplanBarBaseViewModel(BarBase barBase) { if (barBase == null) { throw new ArgumentNullException(nameof(barBase)); } this._barBase = barBase; }
public void PriceAvgTest() { BarBase target = CreateBarBase(); var xml = target.ToXml(saveOptions: System.Xml.Linq.SaveOptions.DisableFormatting); TestContext.WriteLine("Rate:" + xml); Assert.AreEqual(((10 + 9) / 2.0 + (2 + 1) / 2.0) / 2, target.PriceAvg); Assert.AreEqual(target.PriceAvg, target.RunningHigh); Assert.AreEqual(target.RunningHigh, target.RunningLow); }
/// <summary> /// Constructor to build a <see c_ref="BarSettings" /> instance from the defaults. /// </summary> public BarSettings(GraphPane parentPane) { _minClusterGap = Default.MinClusterGap; _minBarGap = Default.MinBarGap; _clusterScaleWidth = Default.ClusterScaleWidth; _clusterScaleWidthAuto = Default.ClusterScaleWidthAuto; _base = Default.Base; _type = Default.Type; _ownerPane = parentPane; }
/// <summary> /// Copy constructor /// </summary> /// <param name="rhs">the <see c_ref="BarSettings" /> instance to be copied.</param> /// <param name="parentPane">The <see c_ref="GraphPane" /> that will be the /// parent of this new BarSettings object.</param> public BarSettings(BarSettings rhs, GraphPane parentPane) { _minClusterGap = rhs._minClusterGap; _minBarGap = rhs._minBarGap; _clusterScaleWidth = rhs._clusterScaleWidth; _clusterScaleWidthAuto = rhs._clusterScaleWidthAuto; _base = rhs._base; _type = rhs._type; _ownerPane = parentPane; }
/// <summary> /// Constructor for deserializing objects /// </summary> /// <remarks> /// You MUST set the _ownerPane property after deserializing a BarSettings object. /// </remarks> /// <param name="info">A <see c_ref="SerializationInfo"/> instance that defines the /// serialized data /// </param> /// <param name="context">A <see c_ref="StreamingContext"/> instance that contains /// the serialized data /// </param> internal BarSettings(SerializationInfo info, StreamingContext context) { // The schema value is just a file version parameter. You can use it to make future versions // backwards compatible as new member variables are added to classes int sch = info.GetInt32("schema"); _minClusterGap = info.GetSingle("minClusterGap"); _minBarGap = info.GetSingle("minBarGap"); _clusterScaleWidth = info.GetDouble("clusterScaleWidth"); _clusterScaleWidthAuto = info.GetBoolean("clusterScaleWidthAuto"); _base = (BarBase)info.GetValue("base", typeof(BarBase)); _type = (BarType)info.GetValue("type", typeof(BarType)); }
static void GetBarGraphAxes(BarBase barBase, GraphControl graph, out Axis indexAxis, out Axis valueAxis) { switch (barBase) { case BarBase.X: case BarBase.X2: indexAxis = graph.GraphPane.XAxis; valueAxis = graph.GraphPane.YAxis; break; case BarBase.Y: case BarBase.Y2: indexAxis = graph.GraphPane.YAxis; valueAxis = graph.GraphPane.XAxis; break; default: throw new ArgumentOutOfRangeException(nameof(barBase)); } }
public Foo() : base() { // populate our modified property with the derived class Bar = new Bar(); //base.Bar = Bar; // I don't want to do this, but how can I avoid it? }
/// <summary> /// Constructor to build a <see cref="BarSettings" /> instance from the defaults. /// </summary> public BarSettings( GraphPane parentPane ) { _minClusterGap = Default.MinClusterGap; _minBarGap = Default.MinBarGap; _clusterScaleWidth = Default.ClusterScaleWidth; _clusterScaleWidthAuto = Default.ClusterScaleWidthAuto; _base = Default.Base; _type = Default.Type; _ownerPane = parentPane; }
/// <summary> /// Constructor for deserializing objects /// </summary> /// <remarks> /// You MUST set the _ownerPane property after deserializing a BarSettings object. /// </remarks> /// <param name="info">A <see cref="SerializationInfo"/> instance that defines the /// serialized data /// </param> /// <param name="context">A <see cref="StreamingContext"/> instance that contains /// the serialized data /// </param> internal BarSettings( SerializationInfo info, StreamingContext context ) { // The schema value is just a file version parameter. You can use it to make future versions // backwards compatible as new member variables are added to classes int sch = info.GetInt32( "schema" ); _minClusterGap = info.GetSingle( "minClusterGap" ); _minBarGap = info.GetSingle( "minBarGap" ); _clusterScaleWidth = info.GetDouble( "clusterScaleWidth" ); _clusterScaleWidthAuto = info.GetBoolean( "clusterScaleWidthAuto" ); _base = (BarBase)info.GetValue( "base", typeof( BarBase ) ); _type = (BarType)info.GetValue( "type", typeof( BarType ) ); }
/// <summary> /// Copy constructor /// </summary> /// <param name="rhs">the <see cref="BarSettings" /> instance to be copied.</param> /// <param name="parentPane">The <see cref="GraphPane" /> that will be the /// parent of this new BarSettings object.</param> public BarSettings( BarSettings rhs, GraphPane parentPane ) { _minClusterGap = rhs._minClusterGap; _minBarGap = rhs._minBarGap; _clusterScaleWidth = rhs._clusterScaleWidth; _clusterScaleWidthAuto = rhs._clusterScaleWidthAuto; _base = rhs._base; _type = rhs._type; _ownerPane = parentPane; }
public AbstrFoo(BarBase barBase) { BarBase = barBase; }
/// <summary> /// The Copy Constructor /// </summary> /// <param name="rhs">The GraphPane object from which to copy</param> public GraphPane( GraphPane rhs ) { paneRect = rhs.PaneRect; xAxis = new XAxis( rhs.XAxis ); yAxis = new YAxis( rhs.YAxis ); y2Axis = new Y2Axis( rhs.Y2Axis ); legend = new Legend( rhs.Legend); curveList = new CurveList( rhs.CurveList ); graphItemList = new GraphItemList( rhs.GraphItemList ); this.title = rhs.Title; this.isShowTitle = rhs.IsShowTitle; this.fontSpec = (FontSpec) rhs.FontSpec.Clone(); this.isIgnoreInitial = rhs.IsIgnoreInitial; this.paneBorder = (Border) rhs.PaneBorder.Clone(); this.paneFill = (Fill) rhs.PaneFill.Clone(); this.isAxisRectAuto = rhs.IsAxisRectAuto; this.axisBorder = (Border) rhs.AxisBorder.Clone(); this.axisFill = (Fill) rhs.AxisFill.Clone(); this.baseDimension = rhs.BaseDimension; this.isFontsScaled = rhs.isFontsScaled; this.isPenWidthScaled = rhs.isPenWidthScaled; this.paneGap = rhs.PaneGap; this.minClusterGap = rhs.MinClusterGap; this.minBarGap = rhs.MinBarGap; this.clusterScaleWidth = rhs.ClusterScaleWidth; this.barBase = rhs.BarBase; this.barType = rhs.BarType; }
/// <summary> /// Constructor for the <see cref="GraphPane"/> object. This routine will /// initialize all member variables and classes, setting appropriate default /// values as defined in the <see cref="Default"/> class. /// </summary> /// <param name="paneRect"> A rectangular screen area where the graph is to be displayed. /// This area can be any size, and can be resize at any time using the /// <see cref="PaneRect"/> property. /// </param> /// <param name="paneTitle">The <see cref="Axis.Title"/> for this <see cref="GraphPane"/></param> /// <param name="xTitle">The <see cref="Axis.Title"/> for the <see cref="XAxis"/></param> /// <param name="yTitle">The <see cref="Axis.Title"/> for the <see cref="YAxis"/></param> public GraphPane( RectangleF paneRect, string paneTitle, string xTitle, string yTitle ) { this.paneRect = paneRect; xAxis = new XAxis( xTitle ); yAxis = new YAxis( yTitle ); y2Axis = new Y2Axis( "" ); legend = new Legend(); curveList = new CurveList(); graphItemList = new GraphItemList(); this.title = paneTitle; this.isShowTitle = Default.IsShowTitle; this.fontSpec = new FontSpec( Default.FontFamily, Default.FontSize, Default.FontColor, Default.FontBold, Default.FontItalic, Default.FontUnderline, Default.FontFillColor, Default.FontFillBrush, Default.FontFillType ); this.fontSpec.Border.IsVisible = false; this.isIgnoreInitial = Default.IsIgnoreInitial; this.paneBorder = new Border( Default.IsPaneBorderVisible, Default.PaneBorderColor, Default.PaneBorderPenWidth ); this.paneFill = new Fill( Default.PaneBackColor, Default.PaneBackBrush, Default.PaneBackType ); this.isAxisRectAuto = true; this.axisBorder = new Border( Default.IsAxisBorderVisible, Default.AxisBorderColor, Default.AxisBorderPenWidth ); this.axisFill = new Fill( Default.AxisBackColor, Default.AxisBackBrush, Default.AxisBackType ); this.baseDimension = Default.BaseDimension; this.paneGap = Default.PaneGap; this.isFontsScaled = true; this.isPenWidthScaled = Default.IsPenWidthScaled; this.minClusterGap = Default.MinClusterGap; this.minBarGap = Default.MinBarGap; this.clusterScaleWidth = Default.ClusterScaleWidth; this.barBase = Default.BarBase; this.barType = Default.BarType; }