public override bool SetProperties(Dictionary <string, object> properties) { logLevel = (LogLevel)Enum.Parse(typeof(LogLevel), (string)properties["LogLevel"]); doLog = (bool)properties["DoLog"]; fuserType = (FusionType)Enum.Parse(typeof(FusionType), (string)properties["FuserType"]); return(true); }
//private List<FusionCandidate> fragSources; public FusionCandidate(String seq) { this.seq = seq; this.junctionIndexes = new List <int>(); //this.foundIons = new bool[seq.Length]; fusionType = FusionType.TS; //default this.parentInfo = new List <ParentInfo>(); this.translatedParents = new List <TranslatedParent>(); this.cisParents = new List <CisParent>(); this.transParents = new List <TransParent>(); }
static void fuseEnvironmentBindings(string inner_name, IList <Tuple <string, string, EnvironmentPortType> > bindings, IDictionary <string, InstanceType> component_refs) { int counter = 0; foreach (Tuple <string, string, EnvironmentPortType> binding in bindings) { string port_name = binding.Item2 + (counter++); string instance_ref = component_refs [binding.Item1].instance_ref; InnerRenamingType renaming = new InnerRenamingType(); renaming.cRef = instance_ref; renaming.cOldName = binding.Item2; renaming.cNewName = port_name; FusionType fusion = new FusionType(); fusion.cRefs = new string[2]; fusion.cRefs [0] = instance_ref; fusion.cRefs [1] = inner_name; fusion.pRef = port_name; } }
public override bool SetProperties(Dictionary<string, object> properties) { logLevel = (LogLevel)Enum.Parse(typeof(LogLevel), (string)properties["LogLevel"]); doLog = (bool)properties["DoLog"]; fuserType = (FusionType)Enum.Parse(typeof(FusionType), (string)properties["FuserType"]); return true; }
/********* ** Public Methods *********/ /// <summary>Constructs an instance.</summary> /// <param name="fusionType">The fusion type.</param> /// <param name="resultArcana">The result arcana of the fusion.</param> /// <param name="sourceArcanas">The source arcanas of the fusion.</param> public ArcanaFusionResult(FusionType fusionType, string resultArcana, List <string> sourceArcanas) { FusionType = fusionType; ResultArcana = resultArcana; SourceArcanas = sourceArcanas ?? new(); }
protected void LoadBodyItems(Object[] cb) { Console.Write("LoadBodyItems:" + cb == null); foreach (Object o in cb) { Console.Write("Object:"); if (o is InnerComponentType) { Console.WriteLine("Object:InnerComponentType " + ((InnerComponentType)o).localRef); if (inner == null) { inner = new List <InnerComponentType>(); innerAll = new List <InnerComponentType>(); } inner.Add((InnerComponentType)o); innerAll.Add((InnerComponentType)o); } else if (o is ParameterType) { Console.WriteLine("Object:ParameterType"); if (parameter == null) { parameter = new List <ParameterType>(); } parameter.Add((ParameterType)o); } else if (o is ParameterSupplyType) { Console.WriteLine("Object:ParameterSupplyType"); if (parameterSupply == null) { parameterSupply = new List <ParameterSupplyType>(); } //ParameterSupplyType o_ = (ParameterSupplyType)o; //if (o_.direct) parameterSupply.Add((ParameterSupplyType)o); } else if (o is InnerRenamingType) { Console.WriteLine("Object:InnerRenamingType"); if (innerRenaming == null) { innerRenaming = new List <InnerRenamingType>(); } innerRenaming.Add((InnerRenamingType)o); } else if (o is FusionType) { Console.WriteLine("Object:FusionType"); if (fusion == null) { fusion = new Dictionary <string, string>(); } FusionType fo = (FusionType)o; fusion.Add(fo.pRef, fo.cRefs[0]); } else if (o is SplitType) { Console.WriteLine("Object:SplitType"); if (split == null) { split = new List <SplitType>(); } split.Add((SplitType)o); } else if (o is RecursiveEntryType) { Console.WriteLine("Object:RecursiveEntryType"); if (recursiveEntry == null) { recursiveEntry = new List <RecursiveEntryType>(); } recursiveEntry.Add((RecursiveEntryType)o); } else if (o is InterfaceType) { Console.WriteLine("Object:InterfaceType"); if (anInterface == null) { anInterface = new List <InterfaceType>(); } anInterface.Add((InterfaceType)o); } else if (o is UnitType) { Console.WriteLine("Object:UnitType"); if (unit == null) { unit = new List <UnitType>(); } unit.Add((UnitType)o); } else if (o is EnumeratorType) { Console.WriteLine("Object:EnumeratorType"); if (enumerator == null) { enumerator = new List <EnumeratorType>(); } enumerator.Add((EnumeratorType)o); } else if (o is ExternalLibraryType) { Console.WriteLine("Object:ExternalLibraryType"); if (externalLibrary == null) { externalLibrary = new List <ExternalLibraryType>(); } externalLibrary.Add((ExternalLibraryType)o); } else { // Tipos inesperado .... } } }