public static IBlockWeb LoadBlockWeb(string filePath, string blckWebId, IBlockBroker defaultBroker, Hashtable globalArgs = null) { XmlDocument doc = new XmlDocument(); doc.Load(filePath + DefaultExtension); NodeProcessor.DefaultBroker = defaultBroker; XmlElement rootElement = doc.SelectSingleNode("//blockWeb[@id='" + blckWebId + "']") as XmlElement; if (globalArgs != null) { foreach (string key in globalArgs.Keys) { NodeProcessor.SetVar(key, globalArgs[key]); } } return NodeProcessor.ProcessNode(rootElement, null, null, null) as IBlockWeb; }
private void construct(string id, BlockWeb containerWeb, IBlockBroker broker, PlatformType platform, IContainerBlock cont, bool isRemotable) { this.platform = platform; if (containerWeb != null) { blockBroker = containerWeb.blockBroker; } else if (broker != null) { blockBroker = broker; } if (id != null) { this.myId = id; } else { this.myId = random.Next().ToString(); } containerBlock = cont; if ( isRemotable ) startServer(); }
public BlockWeb(string id = null, IBlockBroker broker = null, BlockWeb containerWeb = null, PlatformType platform = PlatformType.Neutral, IContainerBlock containerBlock = null, bool isRemotable = false) { construct(id, containerWeb, broker, platform, containerBlock, isRemotable); }