summaryrefslogtreecommitdiff
path: root/BCT/BytecodeTranslator/Phone/PhoneInitializationTraverser.cs
diff options
context:
space:
mode:
authorGravatar Unknown <t-espave@A3479886.redmond.corp.microsoft.com>2011-07-19 16:15:21 -0700
committerGravatar Unknown <t-espave@A3479886.redmond.corp.microsoft.com>2011-07-19 16:15:21 -0700
commit3825b633688c844aa62ccbfc48d395ae753e10f6 (patch)
tree446a1ab24dbc7009ee5fb4e92e21c5f072c2616e /BCT/BytecodeTranslator/Phone/PhoneInitializationTraverser.cs
parentafca2f64e02a837516f8110bf85cc9b7142c317d (diff)
edited out phoneplugin from most places
havoc'ing uri when navigation cannot be determined (partial) added boilerplate boogie code
Diffstat (limited to 'BCT/BytecodeTranslator/Phone/PhoneInitializationTraverser.cs')
-rw-r--r--BCT/BytecodeTranslator/Phone/PhoneInitializationTraverser.cs12
1 files changed, 4 insertions, 8 deletions
diff --git a/BCT/BytecodeTranslator/Phone/PhoneInitializationTraverser.cs b/BCT/BytecodeTranslator/Phone/PhoneInitializationTraverser.cs
index e4510a7d..92090cc1 100644
--- a/BCT/BytecodeTranslator/Phone/PhoneInitializationTraverser.cs
+++ b/BCT/BytecodeTranslator/Phone/PhoneInitializationTraverser.cs
@@ -26,7 +26,6 @@ namespace BytecodeTranslator.Phone {
public class PhoneInitializationCodeTraverser : BaseCodeTraverser {
private readonly IMethodDefinition methodBeingTraversed;
private static bool initializationFound= false;
- private PhoneControlsPlugin phonePlugin;
private MetadataReaderHost host;
private IAssemblyReference coreAssemblyRef;
@@ -69,9 +68,8 @@ namespace BytecodeTranslator.Phone {
}
}
- public PhoneInitializationCodeTraverser(MetadataReaderHost host, IMethodDefinition traversedMethod, PhoneControlsPlugin phonePlugin) : base() {
+ public PhoneInitializationCodeTraverser(MetadataReaderHost host, IMethodDefinition traversedMethod) : base() {
this.methodBeingTraversed = traversedMethod;
- this.phonePlugin = phonePlugin;
this.host = host;
InitializeTraverser();
}
@@ -142,7 +140,7 @@ namespace BytecodeTranslator.Phone {
private void injectPhoneInitializationCode(BlockStatement block, Statement statementAfter) {
// TODO check page name against container name
- IEnumerable<ControlInfoStructure> controls= phonePlugin.getControlsForPage(methodBeingTraversed.Container.ToString());
+ IEnumerable<ControlInfoStructure> controls= PhoneCodeHelper.PhonePlugin.getControlsForPage(methodBeingTraversed.Container.ToString());
IEnumerable<IStatement> injectedStatements = new List<IStatement>();
foreach (ControlInfoStructure controlInfo in controls) {
injectedStatements = injectedStatements.Concat(getCodeForSettingEnabledness(controlInfo));
@@ -275,12 +273,10 @@ namespace BytecodeTranslator.Phone {
/// Traverse metadata looking only for PhoneApplicationPage's constructors
/// </summary>
public class PhoneInitializationMetadataTraverser : BaseMetadataTraverser {
- private PhoneControlsPlugin phoneControlsInfo;
private MetadataReaderHost host;
- public PhoneInitializationMetadataTraverser(PhoneControlsPlugin phonePlugin, MetadataReaderHost host)
+ public PhoneInitializationMetadataTraverser(MetadataReaderHost host)
: base() {
- this.phoneControlsInfo = phonePlugin;
this.host = host;
}
@@ -309,7 +305,7 @@ namespace BytecodeTranslator.Phone {
if (!method.IsConstructor)
return;
- PhoneInitializationCodeTraverser codeTraverser = new PhoneInitializationCodeTraverser(host, method, phoneControlsInfo);
+ PhoneInitializationCodeTraverser codeTraverser = new PhoneInitializationCodeTraverser(host, method);
var methodBody = method.Body as SourceMethodBody;
if (methodBody == null)
return;