text:
using NMF.Collections.Generic;
using NMF.Collections.ObjectModel;
using NMF.Expressions;
using NMF.Expressions.Linq;
using NMF.Models;
using NMF.Models.Collections;
using NMF.Models.Expressions;
using NMF.Models.Meta;
using NMF.Models.Repository;
using NMF.Serialization;
using NMF.Utilities;
using System;
using System.Collections;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.ComponentModel;
using System.Diagnostics;
using System.Linq;
using TTC2017.SmartGrids.CIM.IEC61968.LoadControl;
using TTC2017.SmartGrids.CIM.IEC61968.Metering;
using TTC2017.SmartGrids.CIM.IEC61968.WiresExt;
using TTC2017.SmartGrids.CIM.IEC61970.Core;
using TTC2017.SmartGrids.CIM.IEC61970.Generation.GenerationDynamics;
using TTC2017.SmartGrids.CIM.IEC61970.Generation.Production;
using TTC2017.SmartGrids.CIM.IEC61970.Informative.EnergyScheduling;
using TTC2017.SmartGrids.CIM.IEC61970.Informative.InfAssets;
using TTC2017.SmartGrids.CIM.IEC61970.Informative.InfLoadControl;
using TTC2017.SmartGrids.CIM.IEC61970.Informative.MarketOperations;
using TTC2017.SmartGrids.CIM.IEC61970.LoadModel;
using TTC2017.SmartGrids.CIM.IEC61970.Meas;
using TTC2017.SmartGrids.CIM.IEC61970.Outage;
using TTC2017.SmartGrids.CIM.IEC61970.Protection;
using TTC2017.SmartGrids.CIM.IEC61970.StateVariables;

namespace TTC2017.SmartGrids.CIM.IEC61970.Wires
{

    /// <summary>
    /// The default implementation of the PhaseTapChanger class
    /// </summary>
    [XmlNamespaceAttribute("http://iec.ch/TC57/2009/CIM-schema-cim14#Wires")]
    [XmlNamespacePrefixAttribute("cimWires")]
    [ModelRepresentationClassAttribute("http://iec.ch/TC57/2009/CIM-schema-cim14#//IEC61970/Wires/PhaseTapChanger")]
    [DebuggerDisplayAttribute("PhaseTapChanger {UUID}")]
    public partial class PhaseTapChanger : TapChanger, IPhaseTapChanger, IModelElement
    {

        /// <summary>
        /// The backing field for the WindingConnectionAngle property
        /// </summary>
        private float _windingConnectionAngle;

        private static Lazy<ITypedElement> _windingConnectionAngleAttribute = new Lazy<ITypedElement>(RetrieveWindingConnectionAngleAttribute);

        /// <summary>
        /// The backing field for the PhaseTapChangerType property
        /// </summary>
        private Nullable<PhaseTapChangerKind> _phaseTapChangerType;

        private static Lazy<ITypedElement> _phaseTapChangerTypeAttribute = new Lazy<ITypedElement>(RetrievePhaseTapChangerTypeAttribute);

        /// <summary>
        /// The backing field for the StepPhaseShiftIncrement property
        /// </summary>
        private float _stepPhaseShiftIncrement;

        private static Lazy<ITypedElement> _stepPhaseShiftIncrementAttribute = new Lazy<ITypedElement>(RetrieveStepPhaseShiftIncrementAttribute);

        /// <summary>
        /// The backing field for the VoltageStepIncrementOutOfPhase property
        /// </summary>
        private float _voltageStepIncrementOutOfPhase;

        private static Lazy<ITypedElement> _voltageStepIncrementOutOfPhaseAttribute = new Lazy<ITypedElement>(RetrieveVoltageStepIncrementOutOfPhaseAttribute);

        /// <summary>
        /// The backing field for the NominalVoltageOutOfPhase property
        /// </summary>
        private float _nominalVoltageOutOfPhase;

        private static Lazy<ITypedElement> _nominalVoltageOutOfPhaseAttribute = new Lazy<ITypedElement>(RetrieveNominalVoltageOutOfPhaseAttribute);

        /// <summary>
        /// The backing field for the XStepMax property
        /// </summary>
        private float _xStepMax;

        private static Lazy<ITypedElement> _xStepMaxAttribute = new Lazy<ITypedElement>(RetrieveXStepMaxAttribute);

        /// <summary>
        /// The backing field for the XStepMin property
        /// </summary>
        private float _xStepMin;

        private static Lazy<ITypedElement> _xStepMinAttribute = new Lazy<ITypedElement>(RetrieveXStepMinAttribute);

        private static Lazy<ITypedElement> _transformerWindingReference = new Lazy<ITypedElement>(RetrieveTransformerWindingReference);

        /// <summary>
        /// The backing field for the TransformerWinding property
        /// </summary>
        private ITransformerWinding _transformerWinding;

        private static Lazy<ITypedElement> _windingReference = new Lazy<ITypedElement>(RetrieveWindingReference);

        /// <summary>
        /// The backing field for the Winding property
        /// </summary>
        private IDistributionTransformerWinding _winding;

        private static Lazy<ITypedElement> _phaseVariationCurveReference = new Lazy<ITypedElement>(RetrievePhaseVariationCurveReference);

        /// <summary>
        /// The backing field for the PhaseVariationCurve property
        /// </summary>
        private IPhaseVariationCurve _phaseVariationCurve;

        private static IClass _classInstance;

        /// <summary>
        /// The windingConnectionAngle property
        /// </summary>
        [XmlElementNameAttribute("windingConnectionAngle")]
        [XmlAttributeAttribute(true)]
        public virtual float WindingConnectionAngle
        {
            get
            {
                return this._windingConnectionAngle;
            }
            set
            {
                if ((this._windingConnectionAngle != value))
                {
                    float old = this._windingConnectionAngle;
                    ValueChangedEventArgs e = new ValueChangedEventArgs(old, value);
                    this.OnWindingConnectionAngleChanging(e);
                    this.OnPropertyChanging("WindingConnectionAngle", e, _windingConnectionAngleAttribute);
                    this._windingConnectionAngle = value;
                    this.OnWindingConnectionAngleChanged(e);
                    this.OnPropertyChanged("WindingConnectionAngle", e, _windingConnectionAngleAttribute);
                }
            }
        }

        /// <summary>
        /// The phaseTapChangerType property
        /// </summary>
        [XmlElementNameAttribute("phaseTapChangerType")]
        [XmlAttributeAttribute(true)]
        public virtual Nullable<PhaseTapChangerKind> PhaseTapChangerType
        {
            get
            {
                return this._phaseTapChangerType;
            }
            set
            {
                if ((this._phaseTapChangerType != value))
                {
                    Nullable<PhaseTapChangerKind> old = this._phaseTapChangerType;
                    ValueChangedEventArgs e = new ValueChangedEventArgs(old, value);
                    this.OnPhaseTapChangerTypeChanging(e);
                    this.OnPropertyChanging("PhaseTapChangerType", e, _phaseTapChangerTypeAttribute);
                    this._phaseTapChangerType = value;
                    this.OnPhaseTapChangerTypeChanged(e);
                    this.OnPropertyChanged("PhaseTapChangerType", e, _phaseTapChangerTypeAttribute);
                }
            }
        }

        /// <summary>
        /// The stepPhaseShiftIncrement property
        /// </summary>
        [XmlElementNameAttribute("stepPhaseShiftIncrement")]
        [XmlAttributeAttribute(true)]
        public virtual float StepPhaseShiftIncrement
        {
            get
            {
                return this._stepPhaseShiftIncrement;
            }
            set
            {
                if ((this._stepPhaseShiftIncrement != value))
                {
                    float old = this._stepPhaseShiftIncrement;
                    ValueChangedEventArgs e = new ValueChangedEventArgs(old, value);
                    this.OnStepPhaseShiftIncrementChanging(e);
                    this.OnPropertyChanging("StepPhaseShiftIncrement", e, _stepPhaseShiftIncrementAttribute);
                    this._stepPhaseShiftIncrement = value;
                    this.OnStepPhaseShiftIncrementChanged(e);
                    this.OnPropertyChanged("StepPhaseShiftIncrement", e, _stepPhaseShiftIncrementAttribute);
                }
            }
        }

        /// <summary>
        /// The voltageStepIncrementOutOfPhase property
        /// </summary>
        [XmlElementNameAttribute("voltageStepIncrementOutOfPhase")]
        [XmlAttributeAttribute(true)]
        public virtual float VoltageStepIncrementOutOfPhase
        {
            get
            {
                return this._voltageStepIncrementOutOfPhase;
            }
            set
            {
                if ((this._voltageStepIncrementOutOfPhase != value))
                {
                    float old = this._voltageStepIncrementOutOfPhase;
                    ValueChangedEventArgs e = new ValueChangedEventArgs(old, value);
                    this.OnVoltageStepIncrementOutOfPhaseChanging(e);
                    this.OnPropertyChanging("VoltageStepIncrementOutOfPhase", e, _voltageStepIncrementOutOfPhaseAttribute);
                    this._voltageStepIncrementOutOfPhase = value;
                    this.OnVoltageStepIncrementOutOfPhaseChanged(e);
                    this.OnPropertyChanged("VoltageStepIncrementOutOfPhase", e, _voltageStepIncrementOutOfPhaseAttribute);
                }
            }
        }

        /// <summary>
        /// The nominalVoltageOutOfPhase property
        /// </summary>
        [XmlElementNameAttribute("nominalVoltageOutOfPhase")]
        [XmlAttributeAttribute(true)]
        public virtual float NominalVoltageOutOfPhase
        {
            get
            {
                return this._nominalVoltageOutOfPhase;
            }
            set
            {
                if ((this._nominalVoltageOutOfPhase != value))
                {
                    float old = this._nominalVoltageOutOfPhase;
                    ValueChangedEventArgs e = new ValueChangedEventArgs(old, value);
                    this.OnNominalVoltageOutOfPhaseChanging(e);
                    this.OnPropertyChanging("NominalVoltageOutOfPhase", e, _nominalVoltageOutOfPhaseAttribute);
                    this._nominalVoltageOutOfPhase = value;
                    this.OnNominalVoltageOutOfPhaseChanged(e);
                    this.OnPropertyChanged("NominalVoltageOutOfPhase", e, _nominalVoltageOutOfPhaseAttribute);
                }
            }
        }

        /// <summary>
        /// The xStepMax property
        /// </summary>
        [XmlElementNameAttribute("xStepMax")]
        [XmlAttributeAttribute(true)]
        public virtual float XStepMax
        {
            get
            {
                return this._xStepMax;
            }
            set
            {
                if ((this._xStepMax != value))
                {
                    float old = this._xStepMax;
                    ValueChangedEventArgs e = new ValueChangedEventArgs(old, value);
                    this.OnXStepMaxChanging(e);
                    this.OnPropertyChanging("XStepMax", e, _xStepMaxAttribute);
                    this._xStepMax = value;
                    this.OnXStepMaxChanged(e);
                    this.OnPropertyChanged("XStepMax", e, _xStepMaxAttribute);
                }
            }
        }

        /// <summary>
        /// The xStepMin property
        /// </summary>
        [XmlElementNameAttribute("xStepMin")]
        [XmlAttributeAttribute(true)]
        public virtual float XStepMin
        {
            get
            {
                return this._xStepMin;
            }
            set
            {
                if ((this._xStepMin != value))
                {
                    float old = this._xStepMin;
                    ValueChangedEventArgs e = new ValueChangedEventArgs(old, value);
                    this.OnXStepMinChanging(e);
                    this.OnPropertyChanging("XStepMin", e, _xStepMinAttribute);
                    this._xStepMin = value;
                    this.OnXStepMinChanged(e);
                    this.OnPropertyChanged("XStepMin", e, _xStepMinAttribute);
                }
            }
        }

        /// <summary>
        /// The TransformerWinding property
        /// </summary>
        [XmlAttributeAttribute(true)]
        [XmlOppositeAttribute("PhaseTapChanger")]
        public virtual ITransformerWinding TransformerWinding
        {
            get
            {
                return this._transformerWinding;
            }
            set
            {
                if ((this._transformerWinding != value))
                {
                    ITransformerWinding old = this._transformerWinding;
                    ValueChangedEventArgs e = new ValueChangedEventArgs(old, value);
                    this.OnTransformerWindingChanging(e);
                    this.OnPropertyChanging("TransformerWinding", e, _transformerWindingReference);
                    this._transformerWinding = value;
                    if ((old != null))
                    {
                        old.PhaseTapChanger = null;
                        old.Deleted -= this.OnResetTransformerWinding;
                    }
                    if ((value != null))
                    {
                        value.PhaseTapChanger = this;
                        value.Deleted += this.OnResetTransformerWinding;
                    }
                    this.OnTransformerWindingChanged(e);
                    this.OnPropertyChanged("TransformerWinding", e, _transformerWindingReference);
                }
            }
        }

        /// <summary>
        /// The Winding property
        /// </summary>
        [XmlAttributeAttribute(true)]
        [XmlOppositeAttribute("PhaseTapChanger")]
        public virtual IDistributionTransformerWinding Winding
        {
            get
            {
                return this._winding;
            }
            set
            {
                if ((this._winding != value))
                {
                    IDistributionTransformerWinding old = this._winding;
                    ValueChangedEventArgs e = new ValueChangedEventArgs(old, value);
                    this.OnWindingChanging(e);
                    this.OnPropertyChanging("Winding", e, _windingReference);
                    this._winding = value;
                    if ((old != null))
                    {
                        old.PhaseTapChanger = null;
                        old.Deleted -= this.OnResetWinding;
                    }
                    if ((value != null))
                    {
                        value.PhaseTapChanger = this;
                        value.Deleted += this.OnResetWinding;
                    }
                    this.OnWindingChanged(e);
                    this.OnPropertyChanged("Winding", e, _windingReference);
                }
            }
        }

        /// <summary>
        /// The PhaseVariationCurve property
        /// </summary>
        [XmlAttributeAttribute(true)]
        [XmlOppositeAttribute("PhaseTapChanger")]
        public virtual IPhaseVariationCurve PhaseVariationCurve
        {
            get
            {
                return this._phaseVariationCurve;
            }
            set
            {
                if ((this._phaseVariationCurve != value))
                {
                    IPhaseVariationCurve old = this._phaseVariationCurve;
                    ValueChangedEventArgs e = new ValueChangedEventArgs(old, value);
                    this.OnPhaseVariationCurveChanging(e);
                    this.OnPropertyChanging("PhaseVariationCurve", e, _phaseVariationCurveReference);
                    this._phaseVariationCurve = value;
                    if ((old != null))
                    {
                        old.PhaseTapChanger = null;
                        old.Deleted -= this.OnResetPhaseVariationCurve;
                    }
                    if ((value != null))
                    {
                        value.PhaseTapChanger = this;
                        value.Deleted += this.OnResetPhaseVariationCurve;
                    }
                    this.OnPhaseVariationCurveChanged(e);
                    this.OnPropertyChanged("PhaseVariationCurve", e, _phaseVariationCurveReference);
                }
            }
        }

        /// <summary>
        /// Gets the referenced model elements of this model element
        /// </summary>
        public override IEnumerableExpression<IModelElement> ReferencedElements
        {
            get
            {
                return base.ReferencedElements.Concat(new PhaseTapChangerReferencedElementsCollection(this));
            }
        }

        /// <summary>
        /// Gets the Class model for this type
        /// </summary>
        public new static IClass ClassInstance
        {
            get
            {
                if ((_classInstance == null))
                {
                    _classInstance = ((IClass)(MetaRepository.Instance.Resolve("http://iec.ch/TC57/2009/CIM-schema-cim14#//IEC61970/Wires/PhaseTapChanger")));
                }
                return _classInstance;
            }
        }

        /// <summary>
        /// Gets fired before the WindingConnectionAngle property changes its value
        /// </summary>
        public event System.EventHandler<ValueChangedEventArgs> WindingConnectionAngleChanging;

        /// <summary>
        /// Gets fired when the WindingConnectionAngle property changed its value
        /// </summary>
        public event System.EventHandler<ValueChangedEventArgs> WindingConnectionAngleChanged;

        /// <summary>
        /// Gets fired before the PhaseTapChangerType property changes its value
        /// </summary>
        public event System.EventHandler<ValueChangedEventArgs> PhaseTapChangerTypeChanging;

        /// <summary>
        /// Gets fired when the PhaseTapChangerType property changed its value
        /// </summary>
        public event System.EventHandler<ValueChangedEventArgs> PhaseTapChangerTypeChanged;

        /// <summary>
        /// Gets fired before the StepPhaseShiftIncrement property changes its value
        /// </summary>
        public event System.EventHandler<ValueChangedEventArgs> StepPhaseShiftIncrementChanging;

        /// <summary>
        /// Gets fired when the StepPhaseShiftIncrement property changed its value
        /// </summary>
        public event System.EventHandler<ValueChangedEventArgs> StepPhaseShiftIncrementChanged;

        /// <summary>
        /// Gets fired before the VoltageStepIncrementOutOfPhase property changes its value
        /// </summary>
        public event System.EventHandler<ValueChangedEventArgs> VoltageStepIncrementOutOfPhaseChanging;

        /// <summary>
        /// Gets fired when the VoltageStepIncrementOutOfPhase property changed its value
        /// </summary>
        public event System.EventHandler<ValueChangedEventArgs> VoltageStepIncrementOutOfPhaseChanged;

        /// <summary>
        /// Gets fired before the NominalVoltageOutOfPhase property changes its value
        /// </summary>
        public event System.EventHandler<ValueChangedEventArgs> NominalVoltageOutOfPhaseChanging;

        /// <summary>
        /// Gets fired when the NominalVoltageOutOfPhase property changed its value
        /// </summary>
        public event System.EventHandler<ValueChangedEventArgs> NominalVoltageOutOfPhaseChanged;

        /// <summary>
        /// Gets fired before the XStepMax property changes its value
        /// </summary>
        public event System.EventHandler<ValueChangedEventArgs> XStepMaxChanging;

        /// <summary>
        /// Gets fired when the XStepMax property changed its value
        /// </summary>
        public event System.EventHandler<ValueChangedEventArgs> XStepMaxChanged;

        /// <summary>
        /// Gets fired before the XStepMin property changes its value
        /// </summary>
        public event System.EventHandler<ValueChangedEventArgs> XStepMinChanging;

        /// <summary>
        /// Gets fired when the XStepMin property changed its value
        /// </summary>
        public event System.EventHandler<ValueChangedEventArgs> XStepMinChanged;

        /// <summary>
        /// Gets fired before the TransformerWinding property changes its value
        /// </summary>
        public event System.EventHandler<ValueChangedEventArgs> TransformerWindingChanging;

        /// <summary>
        /// Gets fired when the TransformerWinding property changed its value
        /// </summary>
        public event System.EventHandler<ValueChangedEventArgs> TransformerWindingChanged;

        /// <summary>
        /// Gets fired before the Winding property changes its value
        /// </summary>
        public event System.EventHandler<ValueChangedEventArgs> WindingChanging;

        /// <summary>
        /// Gets fired when the Winding property changed its value
        /// </summary>
        public event System.EventHandler<ValueChangedEventArgs> WindingChanged;

        /// <summary>
        /// Gets fired before the PhaseVariationCurve property changes its value
        /// </summary>
        public event System.EventHandler<ValueChangedEventArgs> PhaseVariationCurveChanging;

        /// <summary>
        /// Gets fired when the PhaseVariationCurve property changed its value
        /// </summary>
        public event System.EventHandler<ValueChangedEventArgs> PhaseVariationCurveChanged;

        private static ITypedElement RetrieveWindingConnectionAngleAttribute()
        {
            return ((ITypedElement)(((ModelElement)(PhaseTapChanger.ClassInstance)).Resolve("windingConnectionAngle")));
        }

        /// <summary>
        /// Raises the WindingConnectionAngleChanging event
        /// </summary>
        /// <param name="eventArgs">The event data</param>
        protected virtual void OnWindingConnectionAngleChanging(ValueChangedEventArgs eventArgs)
        {
            System.EventHandler<ValueChangedEventArgs> handler = this.WindingConnectionAngleChanging;
            if ((handler != null))
            {
                handler.Invoke(this, eventArgs);
            }
        }

        /// <summary>
        /// Raises the WindingConnectionAngleChanged event
        /// </summary>
        /// <param name="eventArgs">The event data</param>
        protected virtual void OnWindingConnectionAngleChanged(ValueChangedEventArgs eventArgs)
        {
            System.EventHandler<ValueChangedEventArgs> handler = this.WindingConnectionAngleChanged;
            if ((handler != null))
            {
                handler.Invoke(this, eventArgs);
            }
        }

        private static ITypedElement RetrievePhaseTapChangerTypeAttribute()
        {
            return ((ITypedElement)(((ModelElement)(PhaseTapChanger.ClassInstance)).Resolve("phaseTapChangerType")));
        }

        /// <summary>
        /// Raises the PhaseTapChangerTypeChanging event
        /// </summary>
        /// <param name="eventArgs">The event data</param>
        protected virtual void OnPhaseTapChangerTypeChanging(ValueChangedEventArgs eventArgs)
        {
            System.EventHandler<ValueChangedEventArgs> handler = this.PhaseTapChangerTypeChanging;
            if ((handler != null))
            {
                handler.Invoke(this, eventArgs);
            }
        }

        /// <summary>
        /// Raises the PhaseTapChangerTypeChanged event
        /// </summary>
        /// <param name="eventArgs">The event data</param>
        protected virtual void OnPhaseTapChangerTypeChanged(ValueChangedEventArgs eventArgs)
        {
            System.EventHandler<ValueChangedEventArgs> handler = this.PhaseTapChangerTypeChanged;
            if ((handler != null))
            {
                handler.Invoke(this, eventArgs);
            }
        }

        private static ITypedElement RetrieveStepPhaseShiftIncrementAttribute()
        {
            return ((ITypedElement)(((ModelElement)(PhaseTapChanger.ClassInstance)).Resolve("stepPhaseShiftIncrement")));
        }

        /// <summary>
        /// Raises the StepPhaseShiftIncrementChanging event
        /// </summary>
        /// <param name="eventArgs">The event data</param>
        protected virtual void OnStepPhaseShiftIncrementChanging(ValueChangedEventArgs eventArgs)
        {
            System.EventHandler<ValueChangedEventArgs> handler = this.StepPhaseShiftIncrementChanging;
            if ((handler != null))
            {
                handler.Invoke(this, eventArgs);
            }
        }

        /// <summary>
        /// Raises the StepPhaseShiftIncrementChanged event
        /// </summary>
        /// <param name="eventArgs">The event data</param>
        protected virtual void OnStepPhaseShiftIncrementChanged(ValueChangedEventArgs eventArgs)
        {
            System.EventHandler<ValueChangedEventArgs> handler = this.StepPhaseShiftIncrementChanged;
            if ((handler != null))
            {
                handler.Invoke(this, eventArgs);
            }
        }

        private static ITypedElement RetrieveVoltageStepIncrementOutOfPhaseAttribute()
        {
            return ((ITypedElement)(((ModelElement)(PhaseTapChanger.ClassInstance)).Resolve("voltageStepIncrementOutOfPhase")));
        }

        /// <summary>
        /// Raises the VoltageStepIncrementOutOfPhaseChanging event
        /// </summary>
        /// <param name="eventArgs">The event data</param>
        protected virtual void OnVoltageStepIncrementOutOfPhaseChanging(ValueChangedEventArgs eventArgs)
        {
            System.EventHandler<ValueChangedEventArgs> handler = this.VoltageStepIncrementOutOfPhaseChanging;
            if ((handler != null))
            {
                handler.Invoke(this, eventArgs);
            }
        }

        /// <summary>
        /// Raises the VoltageStepIncrementOutOfPhaseChanged event
        /// </summary>
        /// <param name="eventArgs">The event data</param>
        protected virtual void OnVoltageStepIncrementOutOfPhaseChanged(ValueChangedEventArgs eventArgs)
        {
            System.EventHandler<ValueChangedEventArgs> handler = this.VoltageStepIncrementOutOfPhaseChanged;
            if ((handler != null))
            {
                handler.Invoke(this, eventArgs);
            }
        }

        private static ITypedElement RetrieveNominalVoltageOutOfPhaseAttribute()
        {
            return ((ITypedElement)(((ModelElement)(PhaseTapChanger.ClassInstance)).Resolve("nominalVoltageOutOfPhase")));
        }

        /// <summary>
        /// Raises the NominalVoltageOutOfPhaseChanging event
        /// </summary>
        /// <param name="eventArgs">The event data</param>
        protected virtual void OnNominalVoltageOutOfPhaseChanging(ValueChangedEventArgs eventArgs)
        {
            System.EventHandler<ValueChangedEventArgs> handler = this.NominalVoltageOutOfPhaseChanging;
            if ((handler != null))
            {
                handler.Invoke(this, eventArgs);
            }
        }

        /// <summary>
        /// Raises the NominalVoltageOutOfPhaseChanged event
        /// </summary>
        /// <param name="eventArgs">The event data</param>
        protected virtual void OnNominalVoltageOutOfPhaseChanged(ValueChangedEventArgs eventArgs)
        {
            System.EventHandler<ValueChangedEventArgs> handler = this.NominalVoltageOutOfPhaseChanged;
            if ((handler != null))
            {
                handler.Invoke(this, eventArgs);
            }
        }

        private static ITypedElement RetrieveXStepMaxAttribute()
        {
            return ((ITypedElement)(((ModelElement)(PhaseTapChanger.ClassInstance)).Resolve("xStepMax")));
        }

        /// <summary>
        /// Raises the XStepMaxChanging event
        /// </summary>
        /// <param name="eventArgs">The event data</param>
        protected virtual void OnXStepMaxChanging(ValueChangedEventArgs eventArgs)
        {
            System.EventHandler<ValueChangedEventArgs> handler = this.XStepMaxChanging;
            if ((handler != null))
            {
                handler.Invoke(this, eventArgs);
            }
        }

        /// <summary>
        /// Raises the XStepMaxChanged event
        /// </summary>
        /// <param name="eventArgs">The event data</param>
        protected virtual void OnXStepMaxChanged(ValueChangedEventArgs eventArgs)
        {
            System.EventHandler<ValueChangedEventArgs> handler = this.XStepMaxChanged;
            if ((handler != null))
            {
                handler.Invoke(this, eventArgs);
            }
        }

        private static ITypedElement RetrieveXStepMinAttribute()
        {
            return ((ITypedElement)(((ModelElement)(PhaseTapChanger.ClassInstance)).Resolve("xStepMin")));
        }

        /// <summary>
        /// Raises the XStepMinChanging event
        /// </summary>
        /// <param name="eventArgs">The event data</param>
        protected virtual void OnXStepMinChanging(ValueChangedEventArgs eventArgs)
        {
            System.EventHandler<ValueChangedEventArgs> handler = this.XStepMinChanging;
            if ((handler != null))
            {
                handler.Invoke(this, eventArgs);
            }
        }

        /// <summary>
        /// Raises the XStepMinChanged event
        /// </summary>
        /// <param name="eventArgs">The event data</param>
        protected virtual void OnXStepMinChanged(ValueChangedEventArgs eventArgs)
        {
            System.EventHandler<ValueChangedEventArgs> handler = this.XStepMinChanged;
            if ((handler != null))
            {
                handler.Invoke(this, eventArgs);
            }
        }

        private static ITypedElement RetrieveTransformerWindingReference()
        {
            return ((ITypedElement)(((ModelElement)(PhaseTapChanger.ClassInstance)).Resolve("TransformerWinding")));
        }

        /// <summary>
        /// Raises the TransformerWindingChanging event
        /// </summary>
        /// <param name="eventArgs">The event data</param>
        protected virtual void OnTransformerWindingChanging(ValueChangedEventArgs eventArgs)
        {
            System.EventHandler<ValueChangedEventArgs> handler = this.TransformerWindingChanging;
            if ((handler != null))
            {
                handler.Invoke(this, eventArgs);
            }
        }

        /// <summary>
        /// Raises the TransformerWindingChanged event
        /// </summary>
        /// <param name="eventArgs">The event data</param>
        protected virtual void OnTransformerWindingChanged(ValueChangedEventArgs eventArgs)
        {
            System.EventHandler<ValueChangedEventArgs> handler = this.TransformerWindingChanged;
            if ((handler != null))
            {
                handler.Invoke(this, eventArgs);
            }
        }

        /// <summary>
        /// Handles the event that the TransformerWinding property must reset
        /// </summary>
        /// <param name="sender">The object that sent this reset request</param>
        /// <param name="eventArgs">The event data for the reset event</param>
        private void OnResetTransformerWinding(object sender, System.EventArgs eventArgs)
        {
            this.TransformerWinding = null;
        }

        private static ITypedElement RetrieveWindingReference()
        {
            return ((ITypedElement)(((ModelElement)(PhaseTapChanger.ClassInstance)).Resolve("Winding")));
        }

        /// <summary>
        /// Raises the WindingChanging event
        /// </summary>
        /// <param name="eventArgs">The event data</param>
        protected virtual void OnWindingChanging(ValueChangedEventArgs eventArgs)
        {
            System.EventHandler<ValueChangedEventArgs> handler = this.WindingChanging;
            if ((handler != null))
            {
                handler.Invoke(this, eventArgs);
            }
        }

        /// <summary>
        /// Raises the WindingChanged event
        /// </summary>
        /// <param name="eventArgs">The event data</param>
        protected virtual void OnWindingChanged(ValueChangedEventArgs eventArgs)
        {
            System.EventHandler<ValueChangedEventArgs> handler = this.WindingChanged;
            if ((handler != null))
            {
                handler.Invoke(this, eventArgs);
            }
        }

        /// <summary>
        /// Handles the event that the Winding property must reset
        /// </summary>
        /// <param name="sender">The object that sent this reset request</param>
        /// <param name="eventArgs">The event data for the reset event</param>
        private void OnResetWinding(object sender, System.EventArgs eventArgs)
        {
            this.Winding = null;
        }

        private static ITypedElement RetrievePhaseVariationCurveReference()
        {
            return ((ITypedElement)(((ModelElement)(PhaseTapChanger.ClassInstance)).Resolve("PhaseVariationCurve")));
        }

        /// <summary>
        /// Raises the PhaseVariationCurveChanging event
        /// </summary>
        /// <param name="eventArgs">The event data</param>
        protected virtual void OnPhaseVariationCurveChanging(ValueChangedEventArgs eventArgs)
        {
            System.EventHandler<ValueChangedEventArgs> handler = this.PhaseVariationCurveChanging;
            if ((handler != null))
            {
                handler.Invoke(this, eventArgs);
            }
        }

        /// <summary>
        /// Raises the PhaseVariationCurveChanged event
        /// </summary>
        /// <param name="eventArgs">The event data</param>
        protected virtual void OnPhaseVariationCurveChanged(ValueChangedEventArgs eventArgs)
        {
            System.EventHandler<ValueChangedEventArgs> handler = this.PhaseVariationCurveChanged;
            if ((handler != null))
            {
                handler.Invoke(this, eventArgs);
            }
        }

        /// <summary>
        /// Handles the event that the PhaseVariationCurve property must reset
        /// </summary>
        /// <param name="sender">The object that sent this reset request</param>
        /// <param name="eventArgs">The event data for the reset event</param>
        private void OnResetPhaseVariationCurve(object sender, System.EventArgs eventArgs)
        {
            this.PhaseVariationCurve = null;
        }

        /// <summary>
        /// Resolves the given attribute name
        /// </summary>
        /// <returns>The attribute value or null if it could not be found</returns>
        /// <param name="attribute">The requested attribute name</param>
        /// <param name="index">The index of this attribute</param>
        protected override object GetAttributeValue(string attribute, int index)
        {
            if ((attribute == "WINDINGCONNECTIONANGLE"))
            {
                return this.WindingConnectionAngle;
            }
            if ((attribute == "PHASETAPCHANGERTYPE"))
            {
                return this.PhaseTapChangerType;
            }
            if ((attribute == "STEPPHASESHIFTINCREMENT"))
            {
                return this.StepPhaseShiftIncrement;
            }
            if ((attribute == "VOLTAGESTEPINCREMENTOUTOFPHASE"))
            {
                return this.VoltageStepIncrementOutOfPhase;
            }
            if ((attribute == "NOMINALVOLTAGEOUTOFPHASE"))
            {
                return this.NominalVoltageOutOfPhase;
            }
            if ((attribute == "XSTEPMAX"))
            {
                return this.XStepMax;
            }
            if ((attribute == "XSTEPMIN"))
            {
                return this.XStepMin;
            }
            return base.GetAttributeValue(attribute, index);
        }

        /// <summary>
        /// Sets a value to the given feature
        /// </summary>
        /// <param name="feature">The requested feature</param>
        /// <param name="value">The value that should be set to that feature</param>
        protected override void SetFeature(string feature, object value)
        {
            if ((feature == "TRANSFORMERWINDING"))
            {
                this.TransformerWinding = ((ITransformerWinding)(value));
                return;
            }
            if ((feature == "WINDING"))
            {
                this.Winding = ((IDistributionTransformerWinding)(value));
                return;
            }
            if ((feature == "PHASEVARIATIONCURVE"))
            {
                this.PhaseVariationCurve = ((IPhaseVariationCurve)(value));
                return;
            }
            if ((feature == "WINDINGCONNECTIONANGLE"))
            {
                this.WindingConnectionAngle = ((float)(value));
                return;
            }
            if ((feature == "PHASETAPCHANGERTYPE"))
            {
                this.PhaseTapChangerType = ((PhaseTapChangerKind)(value));
                return;
            }
            if ((feature == "STEPPHASESHIFTINCREMENT"))
            {
                this.StepPhaseShiftIncrement = ((float)(value));
                return;
            }
            if ((feature == "VOLTAGESTEPINCREMENTOUTOFPHASE"))
            {
                this.VoltageStepIncrementOutOfPhase = ((float)(value));
                return;
            }
            if ((feature == "NOMINALVOLTAGEOUTOFPHASE"))
            {
                this.NominalVoltageOutOfPhase = ((float)(value));
                return;
            }
            if ((feature == "XSTEPMAX"))
            {
                this.XStepMax = ((float)(value));
                return;
            }
            if ((feature == "XSTEPMIN"))
            {
                this.XStepMin = ((float)(value));
                return;
            }
            base.SetFeature(feature, value);
        }

        /// <summary>
        /// Gets the property expression for the given attribute
        /// </summary>
        /// <returns>An incremental property expression</returns>
        /// <param name="attribute">The requested attribute in upper case</param>
        protected override NMF.Expressions.INotifyExpression<object> GetExpressionForAttribute(string attribute)
        {
            if ((attribute == "TransformerWinding"))
            {
                return new TransformerWindingProxy(this);
            }
            if ((attribute == "Winding"))
            {
                return new WindingProxy(this);
            }
            if ((attribute == "PhaseVariationCurve"))
            {
                return new PhaseVariationCurveProxy(this);
            }
            return base.GetExpressionForAttribute(attribute);
        }

        /// <summary>
        /// Gets the property expression for the given reference
        /// </summary>
        /// <returns>An incremental property expression</returns>
        /// <param name="reference">The requested reference in upper case</param>
        protected override NMF.Expressions.INotifyExpression<NMF.Models.IModelElement> GetExpressionForReference(string reference)
        {
            if ((reference == "TransformerWinding"))
            {
                return new TransformerWindingProxy(this);
            }
            if ((reference == "Winding"))
            {
                return new WindingProxy(this);
            }
            if ((reference == "PhaseVariationCurve"))
            {
                return new PhaseVariationCurveProxy(this);
            }
            return base.GetExpressionForReference(reference);
        }

        /// <summary>
        /// Gets the Class for this model element
        /// </summary>
        public override IClass GetClass()
        {
            if ((_classInstance == null))
            {
                _classInstance = ((IClass)(MetaRepository.Instance.Resolve("http://iec.ch/TC57/2009/CIM-schema-cim14#//IEC61970/Wires/PhaseTapChanger")));
            }
            return _classInstance;
        }

        /// <summary>
        /// The collection class to to represent the children of the PhaseTapChanger class
        /// </summary>
        public class PhaseTapChangerReferencedElementsCollection : ReferenceCollection, ICollectionExpression<IModelElement>, ICollection<IModelElement>
        {

            private PhaseTapChanger _parent;

            /// <summary>
            /// Creates a new instance
            /// </summary>
            public PhaseTapChangerReferencedElementsCollection(PhaseTapChanger parent)
            {
                this._parent = parent;
            }

            /// <summary>
            /// Gets the amount of elements contained in this collection
            /// </summary>
            public override int Count
            {
                get
                {
                    int count = 0;
                    if ((this._parent.TransformerWinding != null))
                    {
                        count = (count + 1);
                    }
                    if ((this._parent.Winding != null))
                    {
                        count = (count + 1);
                    }
                    if ((this._parent.PhaseVariationCurve != null))
                    {
                        count = (count + 1);
                    }
                    return count;
                }
            }

            protected override void AttachCore()
            {
                this._parent.TransformerWindingChanged += this.PropagateValueChanges;
                this._parent.WindingChanged += this.PropagateValueChanges;
                this._parent.PhaseVariationCurveChanged += this.PropagateValueChanges;
            }

            protected override void DetachCore()
            {
                this._parent.TransformerWindingChanged -= this.PropagateValueChanges;
                this._parent.WindingChanged -= this.PropagateValueChanges;
                this._parent.PhaseVariationCurveChanged -= this.PropagateValueChanges;
            }

            /// <summary>
            /// Adds the given element to the collection
            /// </summary>
            /// <param name="item">The item to add</param>
            public override void Add(IModelElement item)
            {
                if ((this._parent.TransformerWinding == null))
                {
                    ITransformerWinding transformerWindingCasted = item.As<ITransformerWinding>();
                    if ((transformerWindingCasted != null))
                    {
                        this._parent.TransformerWinding = transformerWindingCasted;
                        return;
                    }
                }
                if ((this._parent.Winding == null))
                {
                    IDistributionTransformerWinding windingCasted = item.As<IDistributionTransformerWinding>();
                    if ((windingCasted != null))
                    {
                        this._parent.Winding = windingCasted;
                        return;
                    }
                }
                if ((this._parent.PhaseVariationCurve == null))
                {
                    IPhaseVariationCurve phaseVariationCurveCasted = item.As<IPhaseVariationCurve>();
                    if ((phaseVariationCurveCasted != null))
                    {
                        this._parent.PhaseVariationCurve = phaseVariationCurveCasted;
                        return;
                    }
                }
            }

            /// <summary>
            /// Clears the collection and resets all references that implement it.
            /// </summary>
            public override void Clear()
            {
                this._parent.TransformerWinding = null;
                this._parent.Winding = null;
                this._parent.PhaseVariationCurve = null;
            }

            /// <summary>
            /// Gets a value indicating whether the given element is contained in the collection
            /// </summary>
            /// <returns>True, if it is contained, otherwise False</returns>
            /// <param name="item">The item that should be looked out for</param>
            public override bool Contains(IModelElement item)
            {
                if ((item == this._parent.TransformerWinding))
                {
                    return true;
                }
                if ((item == this._parent.Winding))
                {
                    return true;
                }
                if ((item == this._parent.PhaseVariationCurve))
                {
                    return true;
                }
                return false;
            }

            /// <summary>
            /// Copies the contents of the collection to the given array starting from the given array index
            /// </summary>
            /// <param name="array">The array in which the elements should be copied</param>
            /// <param name="arrayIndex">The starting index</param>
            public override void CopyTo(IModelElement[] array, int arrayIndex)
            {
                if ((this._parent.TransformerWinding != null))
                {
                    array[arrayIndex] = this._parent.TransformerWinding;
                    arrayIndex = (arrayIndex + 1);
                }
                if ((this._parent.Winding != null))
                {
                    array[arrayIndex] = this._parent.Winding;
                    arrayIndex = (arrayIndex + 1);
                }
                if ((this._parent.PhaseVariationCurve != null))
                {
                    array[arrayIndex] = this._parent.PhaseVariationCurve;
                    arrayIndex = (arrayIndex + 1);
                }
            }

            /// <summary>
            /// Removes the given item from the collection
            /// </summary>
            /// <returns>True, if the item was removed, otherwise False</returns>
            /// <param name="item">The item that should be removed</param>
            public override bool Remove(IModelElement item)
            {
                if ((this._parent.TransformerWinding == item))
                {
                    this._parent.TransformerWinding = null;
                    return true;
                }
                if ((this._parent.Winding == item))
                {
                    this._parent.Winding = null;
                    return true;
                }
                if ((this._parent.PhaseVariationCurve == item))
                {
                    this._parent.PhaseVariationCurve = null;
                    return true;
                }
                return false;
            }

            /// <summary>
            /// Gets an enumerator that enumerates the collection
            /// </summary>
            /// <returns>A generic enumerator</returns>
            public override IEnumerator<IModelElement> GetEnumerator()
            {
                return Enumerable.Empty<IModelElement>().Concat(this._parent.TransformerWinding).Concat(this._parent.Winding).Concat(this._parent.PhaseVariationCurve).GetEnumerator();
            }
        }

        /// <summary>
        /// Represents a proxy to represent an incremental access to the windingConnectionAngle property
        /// </summary>
        private sealed class WindingConnectionAngleProxy : ModelPropertyChange<IPhaseTapChanger, float>
        {

            /// <summary>
            /// Creates a new observable property access proxy
            /// </summary>
            /// <param name="modelElement">The model instance element for which to create the property access proxy</param>
            public WindingConnectionAngleProxy(IPhaseTapChanger modelElement) :
                    base(modelElement, "windingConnectionAngle")
            {
            }

            /// <summary>
            /// Gets or sets the value of this expression
            /// </summary>
            public override float Value
            {
                get
                {
                    return this.ModelElement.WindingConnectionAngle;
                }
                set
                {
                    this.ModelElement.WindingConnectionAngle = value;
                }
            }
        }

        /// <summary>
        /// Represents a proxy to represent an incremental access to the phaseTapChangerType property
        /// </summary>
        private sealed class PhaseTapChangerTypeProxy : ModelPropertyChange<IPhaseTapChanger, Nullable<PhaseTapChangerKind>>
        {

            /// <summary>
            /// Creates a new observable property access proxy
            /// </summary>
            /// <param name="modelElement">The model instance element for which to create the property access proxy</param>
            public PhaseTapChangerTypeProxy(IPhaseTapChanger modelElement) :
                    base(modelElement, "phaseTapChangerType")
            {
            }

            /// <summary>
            /// Gets or sets the value of this expression
            /// </summary>
            public override Nullable<PhaseTapChangerKind> Value
            {
                get
                {
                    return this.ModelElement.PhaseTapChangerType;
                }
                set
                {
                    this.ModelElement.PhaseTapChangerType = value;
                }
            }
        }

        /// <summary>
        /// Represents a proxy to represent an incremental access to the stepPhaseShiftIncrement property
        /// </summary>
        private sealed class StepPhaseShiftIncrementProxy : ModelPropertyChange<IPhaseTapChanger, float>
        {

            /// <summary>
            /// Creates a new observable property access proxy
            /// </summary>
            /// <param name="modelElement">The model instance element for which to create the property access proxy</param>
            public StepPhaseShiftIncrementProxy(IPhaseTapChanger modelElement) :
                    base(modelElement, "stepPhaseShiftIncrement")
            {
            }

            /// <summary>
            /// Gets or sets the value of this expression
            /// </summary>
            public override float Value
            {
                get
                {
                    return this.ModelElement.StepPhaseShiftIncrement;
                }
                set
                {
                    this.ModelElement.StepPhaseShiftIncrement = value;
                }
            }
        }

        /// <summary>
        /// Represents a proxy to represent an incremental access to the voltageStepIncrementOutOfPhase property
        /// </summary>
        private sealed class VoltageStepIncrementOutOfPhaseProxy : ModelPropertyChange<IPhaseTapChanger, float>
        {

            /// <summary>
            /// Creates a new observable property access proxy
            /// </summary>
            /// <param name="modelElement">The model instance element for which to create the property access proxy</param>
            public VoltageStepIncrementOutOfPhaseProxy(IPhaseTapChanger modelElement) :
                    base(modelElement, "voltageStepIncrementOutOfPhase")
            {
            }

            /// <summary>
            /// Gets or sets the value of this expression
            /// </summary>
            public override float Value
            {
                get
                {
                    return this.ModelElement.VoltageStepIncrementOutOfPhase;
                }
                set
                {
                    this.ModelElement.VoltageStepIncrementOutOfPhase = value;
                }
            }
        }

        /// <summary>
        /// Represents a proxy to represent an incremental access to the nominalVoltageOutOfPhase property
        /// </summary>
        private sealed class NominalVoltageOutOfPhaseProxy : ModelPropertyChange<IPhaseTapChanger, float>
        {

            /// <summary>
            /// Creates a new observable property access proxy
            /// </summary>
            /// <param name="modelElement">The model instance element for which to create the property access proxy</param>
            public NominalVoltageOutOfPhaseProxy(IPhaseTapChanger modelElement) :
                    base(modelElement, "nominalVoltageOutOfPhase")
            {
            }

            /// <summary>
            /// Gets or sets the value of this expression
            /// </summary>
            public override float Value
            {
                get
                {
                    return this.ModelElement.NominalVoltageOutOfPhase;
                }
                set
                {
                    this.ModelElement.NominalVoltageOutOfPhase = value;
                }
            }
        }

        /// <summary>
        /// Represents a proxy to represent an incremental access to the xStepMax property
        /// </summary>
        private sealed class XStepMaxProxy : ModelPropertyChange<IPhaseTapChanger, float>
        {

            /// <summary>
            /// Creates a new observable property access proxy
            /// </summary>
            /// <param name="modelElement">The model instance element for which to create the property access proxy</param>
            public XStepMaxProxy(IPhaseTapChanger modelElement) :
                    base(modelElement, "xStepMax")
            {
            }

            /// <summary>
            /// Gets or sets the value of this expression
            /// </summary>
            public override float Value
            {
                get
                {
                    return this.ModelElement.XStepMax;
                }
                set
                {
                    this.ModelElement.XStepMax = value;
                }
            }
        }

        /// <summary>
        /// Represents a proxy to represent an incremental access to the xStepMin property
        /// </summary>
        private sealed class XStepMinProxy : ModelPropertyChange<IPhaseTapChanger, float>
        {

            /// <summary>
            /// Creates a new observable property access proxy
            /// </summary>
            /// <param name="modelElement">The model instance element for which to create the property access proxy</param>
            public XStepMinProxy(IPhaseTapChanger modelElement) :
                    base(modelElement, "xStepMin")
            {
            }

            /// <summary>
            /// Gets or sets the value of this expression
            /// </summary>
            public override float Value
            {
                get
                {
                    return this.ModelElement.XStepMin;
                }
                set
                {
                    this.ModelElement.XStepMin = value;
                }
            }
        }

        /// <summary>
        /// Represents a proxy to represent an incremental access to the TransformerWinding property
        /// </summary>
        private sealed class TransformerWindingProxy : ModelPropertyChange<IPhaseTapChanger, ITransformerWinding>
        {

            /// <summary>
            /// Creates a new observable property access proxy
            /// </summary>
            /// <param name="modelElement">The model instance element for which to create the property access proxy</param>
            public TransformerWindingProxy(IPhaseTapChanger modelElement) :
                    base(modelElement, "TransformerWinding")
            {
            }

            /// <summary>
            /// Gets or sets the value of this expression
            /// </summary>
            public override ITransformerWinding Value
            {
                get
                {
                    return this.ModelElement.TransformerWinding;
                }
                set
                {
                    this.ModelElement.TransformerWinding = value;
                }
            }
        }

        /// <summary>
        /// Represents a proxy to represent an incremental access to the Winding property
        /// </summary>
        private sealed class WindingProxy : ModelPropertyChange<IPhaseTapChanger, IDistributionTransformerWinding>
        {

            /// <summary>
            /// Creates a new observable property access proxy
            /// </summary>
            /// <param name="modelElement">The model instance element for which to create the property access proxy</param>
            public WindingProxy(IPhaseTapChanger modelElement) :
                    base(modelElement, "Winding")
            {
            }

            /// <summary>
            /// Gets or sets the value of this expression
            /// </summary>
            public override IDistributionTransformerWinding Value
            {
                get
                {
                    return this.ModelElement.Winding;
                }
                set
                {
                    this.ModelElement.Winding = value;
                }
            }
        }

        /// <summary>
        /// Represents a proxy to represent an incremental access to the PhaseVariationCurve property
        /// </summary>
        private sealed class PhaseVariationCurveProxy : ModelPropertyChange<IPhaseTapChanger, IPhaseVariationCurve>
        {

            /// <summary>
            /// Creates a new observable property access proxy
            /// </summary>
            /// <param name="modelElement">The model instance element for which to create the property access proxy</param>
            public PhaseVariationCurveProxy(IPhaseTapChanger modelElement) :
                    base(modelElement, "PhaseVariationCurve")
            {
            }

            /// <summary>
            /// Gets or sets the value of this expression
            /// </summary>
            public override IPhaseVariationCurve Value
            {
                get
                {
                    return this.ModelElement.PhaseVariationCurve;
                }
                set
                {
                    this.ModelElement.PhaseVariationCurve = value;
                }
            }
        }
    }
}


text:
package com.cryptoregistry.ec;

import java.math.BigInteger;

import org.bouncycastle.crypto.params.ECDomainParameters;
import org.bouncycastle.math.ec.ECCurve;
import org.bouncycastle.math.ec.ECPoint;
import org.bouncycastle.util.encoders.Hex;

public class Secp384r1 extends ECParametersHolderBase {

	private static final String NAME = "secp384r1";

	private Secp384r1(ECDomainParameters params) {
		super(params);
	}

	static Secp384r1 instance() {
		ECDomainParameters p = init(NAME);
		return new Secp384r1(p);
	}

	static Secp384r1 p384() {
		ECDomainParameters p = init("P384");
		return new Secp384r1(p);
	}

	static Secp384r1 p384Dash() {
		ECDomainParameters p = init("P-384");
		return new Secp384r1(p);
	}

	private static ECDomainParameters init(String name) {
		// p = 2^384 - 2^128 - 2^96 + 2^32 - 1
		BigInteger p = fromHex("FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFFFFF0000000000000000FFFFFFFF");
		BigInteger a = fromHex("FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFFFFF0000000000000000FFFFFFFC");
		BigInteger b = fromHex("B3312FA7E23EE7E4988E056BE3F82D19181D9C6EFE8141120314088F5013875AC656398D8A2ED19D2A85C8EDD3EC2AEF");
		byte[] S = Hex.decode("A335926AA319A27A1D00896A6773A4827ACDAC73");
		BigInteger n = fromHex("FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFC7634D81F4372DDF581A0DB248B0A77AECEC196ACCC52973");
		BigInteger h = BigInteger.valueOf(1);

		ECCurve curve = new ECCurve.Fp(p, a, b);

		ECPoint G = curve
				.decodePoint(Hex
						.decode("04"
								+ "AA87CA22BE8B05378EB1C71EF320AD746E1D3B628BA79B9859F741E082542A385502F25DBF55296C3A545E3872760AB7"
								+ "3617DE4A96262C6F5D9E98BF9292DC29F8F41DBD289A147CE9DA3113B5F0B8C00A60B1CE1D7E819D7A431D7C90EA0E5F"));

		return new NamedECDomainParameters(curve, G, n, h, S, name);
	}

	@Override
	public ECDomainParameters createParameters() {
		return cached;
	}

}

redpajama_set_name: RedPajamaGithub


text:
"use strict";
var _ = require('lodash');

/**
 * @help Adds NAMESPACE [RFC2342] capability
 */

module.exports = function(server) {

    // Register capability, always usable
    server.registerCapability("NAMESPACE");

    // Add NAMESPACE command
    server.setCommandHandler("NAMESPACE", function(connection, parsed, data, callback) {
        if (connection.state === "Not Authenticated") {
            connection.send({
                tag: parsed.tag,
                command: "NO",
                attributes: [{
                    type: "TEXT",
                    value: "Login first"
                }]
            }, "INVALID COMMAND", parsed, data);
            return callback();
        }
        if (parsed.attributes) {
            connection.send({
                tag: parsed.tag,
                command: "BAD",
                attributes: [{
                    type: "TEXT",
                    value: "Unexpected arguments to NAMESPACE"
                }]
            }, "INVALID COMMAND", parsed, data);
            return callback();
        }

				connection.namespace(function (err,list) {
					// convert into a format that imap can work with
					var converter = function (item) {
						return [item.name,item.separator];
					};
					list = list || {};
					list.personal = _.map(list.personal,converter);
					list.users = _.map(list.users,converter);
					list.shared = _.map(list.shared,converter);

	        connection.send({
	            tag: "*",
	            command: "NAMESPACE",
	            attributes: [
	                list && list.personal && list.personal.length ? list.personal : null,
	                list && list.users && list.users.length ? list.users : null,
	                list && list.shared && list.shared.length ? list.shared : null
	            ]
	        }, "NAMESPACE", parsed, data, list);

	        connection.send({
	            tag: parsed.tag,
	            command: "OK",
	            attributes: [{
	                type: "TEXT",
	                value: "Completed"
	            }]
	        }, "NAMESPACE", parsed, data, list);

	        return callback();
				});

    });
};


text:
<?xml version='1.0'?>
<mavlink>

     <include>common.xml</include>

     <enums>
          <enum name="MOTOR_CONTROL_MODE">
               <description>Motor control modes</description>
               <entry value="0" name="MOTOR_OFF"/>
               <entry value="1" name="MOTOR_SLEEP"/>
               <entry value="2" name="MOTOR_RESET"/>
               <entry value="3" name="MOTOR_AMPLITUDE_CONTROL"/>
               <entry value="4" name="MOTOR_CURRENT_CONTROL"/>
               <entry value="5" name="MOTOR_TORQUE_CONTROL"/>
               <entry value="6" name="MOTOR_VELOCITY_CONTROL"/>
               <entry value="7" name="MOTOR_POSITION_CONTROL"/>
               <entry value="8" name="MOTOR_PASSIVE_BRAKE"/>
               <entry value="9" name="MOTOR_PASSIVE_FREEWHEEL"/>

          </enum>
          <enum name="MOTOR_COMMUTATION_MODE">
               <description>Motor commutation modes for brushless controllers</description>
               <entry value="0" name="MOTOR_TRAPEZOIDAL_HALL"/>
               <entry value="1" name="MOTOR_FOC_HALL"/>
               <entry value="2" name="MOTOR_TRAPEZ_SENSORLESS"/>
               <entry value="3" name="MOTOR_FOC_SENSORLESS"/>
               <entry value="4" name="MOTOR_TRAPEZ_SL_AUTO"/>
               <entry value="5" name="MOTOR_FOC_SL_AUTO"/>
          </enum>
          <enum name="MOTOR_ERROR_STATE">
               <description>Status flags of a motor controller (8 bits)</description>
               <entry value=  "1" name="MOTOR_RUNNING"          ><description>Motor running nominally</description> </entry>
               <entry value=  "2" name="MOTOR_CURRENT_LIMITED"  ><description>Current limiter active</description>  </entry>
               <entry value=  "4" name="MOTOR_OVERLOAD"         ><description>Overload condition</description>      </entry>
               <entry value=  "8" name="MOTOR_STALLED"          ><description>Motor stalled</description>           </entry>
               <entry value= "16" name="MOTOR_SYNC_LOSS"        ><description>Commutation lost synchronisation</description>   </entry>
               <entry value= "32" name="MOTOR_SHORT_CIRCUIT"    ><description>Short circuit in output amplifier</description>  </entry>
               <entry value= "64" name="MOTOR_WATCHDOG_TIMEOUT" ><description>Motor has not received commands within timeout period</description></entry>
               <entry value="128" name="MOTOR_REACHED_SETPOINT" ><description>Motor is tracking the given setpoint</description></entry>
          </enum>

          <enum name="BOOTLOADER_COMMANDS">
               <description>Bootloader/debug command definitions</description>
               <entry value="1" name="BOOT_INITIATE_SESSION"><description>Activates bootloader after power-up</description></entry>
               <entry value="2" name="BOOT_RESET"><description>Reset microcontroller</description></entry>
               <entry value="3" name="BOOT_STATE_RESET"><description>Bootloader returns to default state</description></entry>
               <entry value="4" name="BOOT_GET_PROCESSOR_INFORMATION"><description>Request all processor information. Response: multiple messages with information (see following defintions)</description></entry>
               <entry value="5" name="BOOT_PROCESSOR_MODEL"><description>Response: BOOTLOADER_CMD message with 32bit processor model identifier. Optional: BOOTLOADER_DATA with description string</description></entry>
               <entry value="6" name="BOOT_ARCHITECTURE"><description>Response: BOOTLOADER_DATA with Architecture description string</description></entry>
               <entry value="7" name="BOOT_PAGE_SIZE"><description>Response: BOOTLOADER_CMD message with  param_length = processor page size in bytes</description></entry>
               <entry value="8" name="BOOT_PROCESSOR_ID"><description>Response: BOOTLOADER_DATA with full unique processor ID (120 bits for AVR32)</description></entry>
               <entry value="9" name="BOOT_TARGET_VOLTAGE"><description>Response: BOOTLOADER_CMD message with  param_address = voltage in millivolts (optional)</description></entry>
               <entry value="10" name="BOOT_FLASH_ADDRESS"><description>Response: BOOTLOADER_CMD message with  param_address = start address of flash,  param_length = flash memory size in bytes</description></entry>
               <entry value="11" name="BOOT_RAM_ADDRESS"><description>Response: BOOTLOADER_CMD message with  param_address = start address of RAM, param_length = RAM memory size in bytes</description></entry>
               <entry value="12" name="BOOT_PROTECTED_BOOT_AREA"><description>Response: BOOTLOADER_CMD message with  param_address = first address after Bootloader, param_length=size of bootloader</description></entry>
               <entry value="13" name="BOOT_USERPAGE_ADDRESS"><description>Response: BOOTLOADER_CMD message with  param_address = address of user page, param_length=size of userpage area</description></entry>
               <entry value="14" name="BOOT_BOARD_NAME"><description>Response: BOOTLOADER_DATA message with string of board name (user definable)</description></entry>

               <entry value="16" name="BOOT_START_APPLICATION"><description>leaves bootloader and starts user application</description></entry>
               <entry value="17" name="BOOT_START_AT_ADDRESS"><description>start execution at address in param_address</description></entry>
               <entry value="18" name="BOOT_ERASE_FLASH"><description>erase flash starting from param_address to param_address+param_length (rounded to pages)</description></entry>
               <entry value="19" name="BOOT_ERASE_USERPAGE"><description>erase user page or internal eeprom</description></entry>
               <entry value="20" name="BOOT_START_REPROGRAM"><description>initiates flash upload session</description></entry>
               <entry value="21" name="BOOT_END_REPROGRAM"><description>ends flash upload session</description></entry>
               <entry value="22" name="BOOT_WRITE_TO_BUFFER"><description>BOOTLOADER_DATA: write data to internal page buffer</description></entry>
               <entry value="23" name="BOOT_WRITE_BUFFER_TO_FLASH"><description>BOOTLOADER_CMD: write page buffer contents to flash page at given address. Returns ACK with address, and length=CRC16 of written data.</description></entry>
               <entry value="24" name="BOOT_WRITE_BUFFER_TO_USERPAGE"><description>BOOTLOADER_CMD: write page buffer contents to user page or internal eeprom at relative address</description></entry>
               <entry value="25" name="BOOT_READ_MEMORY"><description>Request data at given memory address with given length</description></entry>
               <entry value="26" name="BOOT_VERIFY_MEMORY"><description>Request CRC16 of data at given memory address and length. Returns ACK with address, and length=CRC16 of written data.</description></entry>
               <entry value="27" name="BOOT_READ_FUSES"><description>Response: BOOTLOADER_CMD with param_address = fuse bytes</description></entry>
               <entry value="28" name="BOOT_WRITE_FUSES"><description>Set fuse bytes to value in param_address</description></entry>
               <entry value="29" name="BOOT_READ_REGISTERS"><description>Response: BOOTLOADER_DATA with register dump</description></entry>
               <entry value="30" name="BOOT_READ_STACKPOINTER"><description>Response: BOOTLOADER_CMD with stackpointer value in param_address</description></entry>
               <entry value="31" name="BOOT_READ_STACK"><description>Response: BOOTLOADER_DATA with stack dump of param_length</description></entry>
               <entry value="32" name="BOOT_DEBUG_PAUSE"><description>pause execution and enter debug mode</description></entry>
               <entry value="33" name="BOOT_DEBUG_CONTINUE"><description>continue execution</description></entry>

               <entry value="128" name="ACK_FLAG"><description></description></entry>

          </enum>

     </enums>
     <messages>
          <message id="150" name="MOTOR_COMMAND">
               <description>Command to configure and control motor controllers</description>
               <field type="uint32_t" name="time_boot_ms">Timestamp (milliseconds since system boot)</field>
                <field type="uint8_t" name="target_system">System ID</field>
               <field type="uint8_t" name="target_component">Component ID</field>
               <field type="uint8_t" name="control_mode">set the motor control mode (MOTOR_CONTROL_MODE enum)</field>
                <field type="float" name="setpoint">Target setpoint. Amplitude: -1.0 - 1.0, Current: Ampere, Torque: Nm, Velocity: RPM, Position: Degrees/mm</field>
                <field type="float" name="current_limit">Current limit in Ampere</field>
          </message>

          <message id="151" name="MOTOR_STATE">
               <description>Motor state message containing measurements and state of motor controllers</description>
               <field type="uint32_t" name="time_boot_ms">Timestamp (milliseconds since system boot)</field>
               <field type="uint8_t" name="control_mode">report motor control mode (MOTOR_CONTROL_MODE enum)</field>
               <field type="uint8_t" name="commutation_mode">motor commutation mode</field>
               <field type="uint8_t" name="motor_error_state">motor state flags: </field>
               <field type="uint16_t" name="update_rate">update frequency of commutation controller</field>
               <field type="float" name="speed">motor speed in rpm (sign indicates direction)</field>
               <field type="float" name="supply_voltage">supply voltage in Volt</field>
               <field type="float" name="current">motor current in ampere</field>
               <field type="float" name="power">electrical power delivered by motor controller</field>
               <field type="float" name="torque">motor torque estimate</field>
               <field type="float" name="position">actuator position in degrees or millimeters</field>
               <field type="float" name="sensor_raw_speed">raw speed measured by hall sensors</field>
               <field type="float" name="I_d">field-generating current component (estimated)</field>
               <field type="float" name="I_q">torque-generating current component (estimated)</field>
          </message>

          <message id="180" name="CAN_PACKET">
               <description>Encapsulation of individual CAN packets to tunnel through other streams</description>
               <field type="uint32_t" name="time_boot_ms">Timestamp (milliseconds since system boot)</field>
               <field type="uint8_t" name="bus_id">identifier of the can bus</field>
               <field type="uint32_t" name="can_id">CAN arbitration field (11 or 29 bits)</field>
               <field type="uint8_t" name="frame_type">0: standard frame; 1: remote frame; 2: error frame, 3: overload frame; Extended: 16: standard frame; 17: remote frame; 18: error frame, 19: overload frame</field>
               <field type="uint8_t" name="dlc">data length</field>
               <field type="uint8_t[8]" name="values">raw sample values</field>
          </message>

          <message id="181" name="RAW_DATA_STREAM_8">
               <description>Raw data stream (8-bit) or multi-packet arrays</description>
               <field type="uint32_t" name="time_boot_ms">Timestamp (milliseconds since system boot)</field>
               <field type="uint8_t" name="stream_id">Stream ID</field>
               <field type="uint8_t" name="packets_per_block">Number of packets per block (0 if continuous stream)</field>
               <field type="uint8_t" name="packet_id">packet counter</field>
               <field type="uint8_t" name="sample_count">Number of valid samples in this packet</field>
               <field type="uint8_t[64]" name="values">raw sample values</field>
          </message>

          <message id="182" name="RAW_DATA_STREAM_16">
               <description>Raw data stream (16-bit) or multi-packet arrays</description>
               <field type="uint32_t" name="time_boot_ms">Timestamp (milliseconds since system boot)</field>
               <field type="uint8_t" name="stream_id">Stream ID</field>
               <field type="uint8_t" name="packets_per_block">Number of packets per block (0 if continuous stream)</field>
               <field type="uint8_t" name="packet_id">packet counter</field>
               <field type="uint8_t" name="sample_count">Number of valid samples in this packet</field>
               <field type="int16_t[64]" name="values">raw sample values</field>
          </message>
          <message id="183" name="RAW_DATA_STREAM_FLOAT">
               <description>Raw data stream (32-bit float) or multi-packet arrays</description>
               <field type="uint32_t" name="time_boot_ms">Timestamp (milliseconds since system boot)</field>
               <field type="uint8_t" name="stream_id">Stream ID</field>
               <field type="uint8_t" name="packets_per_block">Number of packets per block (0 if continuous stream)</field>
               <field type="uint8_t" name="packet_id">packet counter</field>
               <field type="uint8_t" name="sample_count">Number of valid samples in this packet</field>
               <field type="float[32]" name="values">raw sample values</field>
          </message>

          <message id="200" name="BOOTLOADER_CMD">
               <description>Additional information on existing messages and commands</description>
               <field type="uint8_t" name="target_system">System which should execute the command</field>
               <field type="uint8_t" name="target_component">Component which should execute the command, 0 for all components</field>
               <field type="uint32_t" name="session_message_counter">unique session handle negotiated when entering boot mode. Incremented by master with each message. Slave returns the last received and processed message as acknowledgement.</field>
               <field type="uint8_t" name="command">Command ID, as defined by BOOTLOADER_CMD enum.</field>
               <field type="uint8_t" name="error_id">Error code in response to previous command or transfer as defined by BOOTLOADER_ERROR enum.</field>
               <field type="uint32_t" name="param_address">Command parameter 1 or memory address depending on command</field>
               <field type="uint32_t" name="param_length"> Command parameter 2 or transfer length depending on command</field>
          </message>

          <message id="201" name="BOOTLOADER_DATA">
               <description>Bootloader memory transfer (reading or writing) for flash or RAM transfers.</description>
               <field type="uint8_t" name="target_system">System which should execute the command</field>
               <field type="uint8_t" name="target_component">Component which should execute the command, 0 for all components</field>
               <field type="uint32_t" name="session_message_counter">unique session handle negotiated when entering boot mode. Incremented by master with each message. Slave returns the last received and processed message as acknowledgement.</field>
               <field type="uint8_t" name="command">Command ID, as defined by BOOTLOADER_CMD enum.</field>
               <field type="uint32_t" name="base_address">32bit memory base address to write to / read from. </field>
               <field type="uint8_t" name="data_length">length of data block (number of valid bytes in data)</field>
               <field type="uint8_t[32]" name="data">raw data for memory transfer</field>

          </message>

     </messages>
</mavlink>


text:
import React, { PropTypes } from 'react';
import format from 'date-fns/format';
import PropertyListItem from './PropertyListItem';
import '../style/FormList.less';

const dateFormat = 'dddd, MMMM Do YYYY, h:mm:ss a';

const NotificationItem = ({ notification }) => (

      <PropertyListItem name={'Recipient'} value={notification.recipient} />
      <PropertyListItem name={'Type'} value={notification.type} />
      <PropertyListItem
        name={'Sent'}
        value={notification.sent ? format(notification.sent, dateFormat) : 'Not Sent'}
      />
      <PropertyListItem
        name={'Delivered'}
        value={
          notification.delivered ? format(notification.delivered, dateFormat) : 'Not Delivered'
        }
      />

);

NotificationItem.propTypes = {
  notification: PropTypes.object.isRequired,
};

export default NotificationItem;


text:
package debug

import (
	"archive/zip"
	"encoding/json"
	"fmt"
	"io"
	"os"
	"path"
	"path/filepath"
	"strings"
)

// zipDir zips all the contents found in src, including both files and
// directories, into a destination file dest. It returns an error upon failure.
// It assumes src is a directory.
func zipDir(src, dest string) error {
	zipFile, err := os.Create(dest)
	if err != nil {
		return err
	}
	defer zipFile.Close()

	zipWriter := zip.NewWriter(zipFile)
	defer zipWriter.Close()

	dirName := filepath.Base(dest)
	baseDir := strings.TrimSuffix(dirName, filepath.Ext(dirName))

	return filepath.Walk(src, func(path string, info os.FileInfo, err error) error {
		if err != nil {
			return err
		}

		header, err := zip.FileInfoHeader(info)
		if err != nil {
			return err
		}

		// Each execution of this utility on a Tendermint process will result in a
		// unique file.
		header.Name = filepath.Join(baseDir, strings.TrimPrefix(path, src))

		// Handle cases where the content to be zipped is a file or a directory,
		// where a directory must have a '/' suffix.
		if info.IsDir() {
			header.Name += "/"
		} else {
			header.Method = zip.Deflate
		}

		headerWriter, err := zipWriter.CreateHeader(header)
		if err != nil {
			return err
		}

		if info.IsDir() {
			return nil
		}

		file, err := os.Open(path)
		if err != nil {
			return err
		}
		defer file.Close()

		_, err = io.Copy(headerWriter, file)
		return err
	})

}

// copyFile copies a file from src to dest and returns an error upon failure. The
// copied file retains the source file's permissions.
func copyFile(src, dest string) error {
	if _, err := os.Stat(src); os.IsNotExist(err) {
		return err
	}

	srcFile, err := os.Open(src)
	if err != nil {
		return err
	}
	defer srcFile.Close()

	destFile, err := os.Create(dest)
	if err != nil {
		return err
	}
	defer destFile.Close()

	if _, err = io.Copy(destFile, srcFile); err != nil {
		return err
	}

	srcInfo, err := os.Stat(src)
	if err != nil {
		return err
	}

	return os.Chmod(dest, srcInfo.Mode())
}

// writeStateToFile pretty JSON encodes an object and writes it to file composed
// of dir and filename. It returns an error upon failure to encode or write to
// file.
func writeStateJSONToFile(state interface{}, dir, filename string) error {
	stateJSON, err := json.MarshalIndent(state, "", "  ")
	if err != nil {
		return fmt.Errorf("failed to encode state dump: %w", err)
	}

	return os.WriteFile(path.Join(dir, filename), stateJSON, os.ModePerm)
}


text:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using AutoMapper;
using Microsoft.AspNetCore.Builder;
using Microsoft.AspNetCore.Hosting;
using Microsoft.AspNetCore.SpaServices.Webpack;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Logging;
using DiplomContentSystem.Services.Students;
using DiplomContentSystem.Services.Teachers;
using DiplomContentSystem.Services.Users;
using DiplomContentSystem.Services.DiplomWorks;
using DiplomContentSystem.Services.Groups;
using DiplomContentSystem.Services.Departments;
using DiplomContentSystem.Services.Specialities;
using DiplomContentSystem.Services.CalendarEvents;
using DiplomContentSystem.Services.Templates;
using DiplomContentSystem.DataLayer;
using DiplomContentSystem.Core;
using FluentValidation.AspNetCore;
using Microsoft.AspNetCore.Mvc.Authorization;
using Microsoft.AspNetCore.Authorization;
using Microsoft.IdentityModel.Tokens;
using System.Text;
using DiplomContentSystem.Controllers;
using DiplomContentSystem.Authentication;
using DiplomContentSystem.Requests;
using Newtonsoft.Json;

namespace DiplomContentSystem
{
    public class Startup
    {
        private const string SecretKey = "someverystrongkey";
        private readonly SymmetricSecurityKey _signingKey = new SymmetricSecurityKey(Encoding.ASCII.GetBytes(SecretKey));

        public Startup(IHostingEnvironment env)
        {
            var builder = new ConfigurationBuilder()
                .SetBasePath(env.ContentRootPath)
                .AddJsonFile("appsettings.json", optional: true, reloadOnChange: true)
                .AddJsonFile($"appsettings.{env.EnvironmentName}.json", optional: true)
                .AddEnvironmentVariables();
            Configuration = builder.Build();
        }

        public IConfigurationRoot Configuration { get; }

        // This method gets called by the runtime. Use this method to add services to the container.
        public void ConfigureServices(IServiceCollection services)
        {
            // Add framework services.
            services.AddMvc(config =>
                {
                    var policy = new AuthorizationPolicyBuilder()
                                    .RequireAuthenticatedUser()
                                    .Build();
                    config.Filters.Add(new AuthorizeFilter(policy));
                })
                .AddFluentValidation(fv => fv.RegisterValidatorsFromAssemblyContaining<Startup>())
                .AddJsonOptions(options =>
                {
                    options.SerializerSettings.ReferenceLoopHandling = ReferenceLoopHandling.Ignore;
                });
            services.AddAutoMapper();
            services.AddScoped<TeacherService>();
            services.AddScoped<UserService>();
            services.AddScoped<StudentService>();
            services.AddScoped<DiplomWorksService>();
            services.AddScoped<GroupService>();
            services.AddScoped<DepartmentService>();
            services.AddScoped<SpecialityService>();
            services.AddScoped<TemplateService>();
            services.AddScoped<CalendarEventService>();
            services.AddScoped<IRepository<Teacher>, RepositoryBase<Teacher>>();
            services.AddScoped<IRepository<Template>, RepositoryBase<Template>>();
            services.AddScoped<IRepository<TemplateType>, RepositoryBase<TemplateType>>();
            services.AddScoped<IRepository<Student>, RepositoryBase<Student>>();
            services.AddScoped<IRepository<DiplomWork>, RepositoryBase<DiplomWork>>();
            services.AddScoped<IRepository<TeacherPosition>, RepositoryBase<TeacherPosition>>();
            services.AddScoped<IRepository<Speciality>, RepositoryBase<Speciality>>();
            services.AddScoped<IRepository<Department>, RepositoryBase<Department>>();
            services.AddScoped<IRepository<ImplementationStage>, RepositoryBase<ImplementationStage>>();
            services.AddScoped<IRepository<CustomStage>, RepositoryBase<CustomStage>>();
            services.AddScoped<IRepository<Group>, RepositoryBase<Group>>();
            services.AddScoped<IRepository<User>, RepositoryBase<User>>();
            services.AddScoped<IUserRepository, UserRepository>();
            services.AddDbContext<DiplomContext>();
            services.AddScoped<IAuthService, AuthService>();
            services.AddScoped<RequestService>();
            services
                .AddAuthPolicy()
                .ConfigureJwtIssuerOptions(Configuration, _signingKey);
        }

        // This method gets called by the runtime. Use this method to configure the HTTP request pipeline.
        public void Configure(IApplicationBuilder app, IHostingEnvironment env, ILoggerFactory loggerFactory)
        {
            app.ConfigureJwtBearerAuthentication(Configuration, _signingKey);

            loggerFactory.AddConsole(Configuration.GetSection("Logging"));
            loggerFactory.AddDebug();

            if (env.IsDevelopment())
            {
                app.UseDeveloperExceptionPage();
                app.UseWebpackDevMiddleware(new WebpackDevMiddlewareOptions
                {
                    HotModuleReplacement = true,
                });
                using (var serviceScope = app.ApplicationServices.GetRequiredService<IServiceScopeFactory>().CreateScope())
                {
                    serviceScope.ServiceProvider.GetService<DiplomContext>().EnsureSeedData();
                }
            }
            else
            {
                app.UseExceptionHandler("/Home/Error");
            }

            app.UseStaticFiles();
            app.UseMvc(routes =>
            {
                routes.MapRoute(
                    name: "default",
                    template: "{controller=Home}/{action=Index}/{id?}");

                routes.MapSpaFallbackRoute(
                    name: "spa-fallback",
                    defaults: new { controller = "Home", action = "Index" });
            });
        }
    }
}


text:
export const fetchHouses = () => {}

export const fetchCharacters = () => {}


text:
package paket1;

public class Uebung5Aufgabe5Run {

	public static void main(String[] args) {
		// TODO Auto-generated method stub

		Uebung5Aufgabe5Auftrag a1 = new Uebung5Aufgabe5Auftrag();

	}

}


text:
<!DOCTYPE html>

    <meta charset="utf-8">
    <title>Banta Technologies - Home</title>
    <link rel="shortcut icon" href="/images/favicon.gif"/>
    <meta name="description"        content="Banta Technologies is a collaborative software development and design firm. We work with startups, nonprofits and established companies to transform great ideas into awesome products.
">
    <meta name="keywords"           content="agile project management, agile software, agile tools, project planning, SAAS, scrum, extreme programming, emergent iterations, ruby developers Kenya, ruby dev Kenya, ruby developes Nairobi, ruby deb in Nairobi, mpesa integration, MTN integration, developers Kenya, ruby shop Kenya, ruby shop Nairobi">

    <meta property="og:title"       content="Banta Technologies - Home">
    <meta property="og:type"        content="website">
    <meta property="og:image"       content="http://bantatechnologies.com/images/banta_technologies.png">
    <meta property="og:url"         content="http://bantatechnologies.com/">
    <meta property="og:description" content="Banta Technologies is a collaborative software development and design firm. We work with startups, nonprofits and established companies to transform great ideas into awesome products.
" />
    <meta property="og:site_name"   content="Banta Technologies">
    <meta property="fb:app_id"      content="544415892392098">
    <meta property="og:locale"      content="en_US">

    <meta name="twitter:title"      content="Banta Technologies - Home">
    <meta name="twitter:card"       content="Banta Technologies is a collaborative software development and design firm. We work with startups, nonprofits and established companies to transform great ideas into awesome products.
">
    <meta name="twitter:site"       content="http://bantatechnologies.com/">
    <meta name="twitter:image"      content="http://bantatechnologies.com/images/banta_technologies.png">
    <meta name="twitter:description" content="Banta Technologies is a collaborative software development and design firm. We work with startups, nonprofits and established companies to transform great ideas into awesome products.
" >

    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">

    <link type="text/css" rel="stylesheet" href="/assets/application.css">

Home

Solutions

Crystal

Startup Supply

EasyM

About

About Us

Process

Working Model

Contact Us

                Build something brilliant

                Banta Technologies is a collaborative software development and design firm. We work with startups, nonprofits and established companies to transform great ideas into awesome products.

                Read More

We Build Software

Innovative. Top-quality. Mission-critical. On-time.

The Agile Way

We. Live. Breathe. Dream. SCRUM. XP

We Are Different

We Build Products With A Difference.

Technology Superstars

We Are The Best Full-Service Mobile App Development Firm.

Crystal

Times have truly changed and it's imperative as an entrepreneur to adapt with the latest technologies to
                grow your business. Crystal is a suite of solutions set out to do just that.

Startup supply

A startup is an adventure. Don't set out unprepared. Banta Technologies will help you bring your startup
                idea to life.

EasyM

This is a platform build to make mobile money integration easy for developers. It's build by developers
                for developers.

What's the DNA of Banta Technologies?

 Beauty

 -  Scalability

 Agility

 Innovation

Everything we do has to be beautiful, easy to use, efficient.
                Aesthetic and practical design is the core of our work.

Every piece of code we write has to tough, bug free, optimised and scalable.

Everything we craft is done iteratively with passion, love and honesty. We are always ready to take
                    feedback from the market/users and change our course to bring out the best possible product that
                    will succeed in the market.

We believe in questioning the status quo. We believe in pushing the limits. We believe in changing
                    the world through technology and design.

We have expertise in

Software Development

Mobile Apps and Games

UX and UI Design

Enterprise Solutions

Get in touch with us now to discuss about your product or technology needs.

            Get a Quote Now

Our Clients

About Us

Banta Technologies is an award-winning new-age boutique software company that delivers cutting-edge products and solutions for customers globally. We are different in a number of ways, we take up only select projects and we are passionate about making your product super-successful. We are known for our exceptional quality, innovation and timely delivery for every project we undertake.

Useful Links

Home

About

Contact Us

Latest Tweets

© Copyright 2015 by Banta Technologies. All Rights Reserved.


text:
var express   = require('express'),
    config    = require('./config'),
    morgan    = require('morgan'),
    scan      = require('./scan'),
    path      = require('path'),
    build     = require('./build');

var app = express();

// Serve static before logging
var clientDir = __dirname + '/client/';
app.use('/static', express.static(clientDir));

// Add Logging
app.use(morgan('dev'));

// Use API Router
app.use('/api', require('./api.js'));

// Send all others to index
app.get('*', function(req, res) {
  res.sendFile(clientDir + '/index.html');
});

module.exports.start = function(pathToConfig) {
  var appConfig = config.application(pathToConfig);

  app.locals.config = appConfig;
  app.locals.path = path.dirname(pathToConfig);

  build.projects(appConfig, function(err) {
    if ( err ) {
      console.log('Error starting server: %s', err);
      process.exit();
    }

    var server = app.listen(appConfig.port || 3400, function() {
      console.log('rs-reporter server started on: http://localhost:%s', server.address().port);
    });

    scan(appConfig, path.dirname(pathToConfig));
  });

};


text:
package org.txazo.jvm.instrument;

public class DynamicBytecodeTest {

    /**
     * VM Args: -javaagent:/Users/txazo/TxazoProject/java/target/dynamic-bytecode-agent.jar
     */
    public static void main(String[] args) throws Exception {
        DynamicClass dynamic = new DynamicClass();
        for (; ; ) {
            dynamic.load();
            Thread.sleep(3000);
        }
    }

}


text:
package org.bremersee.thymeleaf;

import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.when;

import java.util.Collections;
import org.bremersee.thymeleaf.AdditionalThymeleafProperties.ResolverProperties;
import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.ObjectProvider;
import org.springframework.core.io.DefaultResourceLoader;
import org.thymeleaf.TemplateEngine;
import org.thymeleaf.templatemode.TemplateMode;

/**
 * The additional thymeleaf auto configuration test.
 *
 * @author Christian Bremer
 */
class AdditionalThymeleafAutoConfigurationTest {

  /**
   * Register template resolver.
   */
  @Test
  void registerTemplateResolver() {
    // Mockito cannot mock TemplateEngine because getTemplateResolvers() is final.
    TemplateEngine templateEngine = new TemplateEngine();
    //noinspection unchecked
    ObjectProvider<TemplateEngine> provider = mock(ObjectProvider.class);
    when(provider.getIfAvailable()).thenReturn(templateEngine);

    AdditionalThymeleafProperties properties = new AdditionalThymeleafProperties();
    AdditionalThymeleafAutoConfiguration configuration
        = new AdditionalThymeleafAutoConfiguration(properties, provider);
    configuration.setResourceLoader(new DefaultResourceLoader());
    configuration.registerTemplateResolver();

    ResolverProperties resolver0 = new ResolverProperties();
    resolver0.setName("resolver0");
    resolver0.setCacheablePatterns(Collections.singleton("1234"));
    resolver0.setCacheTtlms(123456789L);
    resolver0.setCssTemplateModePatterns(Collections.singleton("2345"));
    resolver0.setHtmlTemplateModePatterns(Collections.singleton("3456"));
    resolver0.setJavaScriptTemplateModePatterns(Collections.singleton("4567"));
    resolver0.setNonCacheablePatterns(Collections.singleton("5678"));
    resolver0.setPrefix("6789");
    resolver0.setRawTemplateModePatterns(Collections.singleton("7890"));
    resolver0.setSuffix("12345");
    resolver0.setTemplateAliases(Collections.singletonMap("key", "23456"));
    resolver0.setTemplateMode(TemplateMode.HTML);
    resolver0.setTextTemplateModePatterns(Collections.singleton("34567"));
    resolver0.setXmlTemplateModePatterns(Collections.singleton("45678"));

    ResolverProperties resolver1 = new ResolverProperties();
    resolver1.setName("");
    resolver1.setPrefix("");
    resolver1.setSuffix("");
    resolver0.setTemplateMode(null);

    properties.getResolvers().add(resolver0);
    properties.getResolvers().add(resolver1);
    configuration.registerTemplateResolver();

    assertEquals(2, templateEngine.getTemplateResolvers().size());
  }

}