public void AddVisibleFunctionToContract(FunctionDefinition funcDef, ContractDefinition contract) { if (FunctionsMap.ContainsKey(contract) == false) { FunctionsMap[contract] = new HashSet <FunctionDefinition>(); } else { //do nothing } FunctionsMap[contract].Add(funcDef); }
//Function to return a hashset of functiondefinitions that are retrieved using a contract instance. public HashSet <FunctionDefinition> RetrieveVisibleFunctions(ContractDefinition contract) { if (FunctionsMap.ContainsKey(contract)) { return(FunctionsMap[contract]); } else { new HashSet <FunctionDefinition>(); } //should not reutnr null, but there lies a possiblity return(null); }