@@ -433,7 +433,6 @@ public class CustomizationsModel
433433 public const string FlattenShapeKey = "flattenShapes" ;
434434 public const string ExcludeShapesKey = "excludeShapes" ;
435435 public const string AlternateLocationNameKey = "alternateLocationName" ;
436- public const string ImplementsVisitorPatternKey = "implementsVisitorPattern" ;
437436
438437 JsonData _documentRoot ;
439438
@@ -1458,9 +1457,9 @@ public class PropertyModifier
14581457 private readonly HashSet < string > _injectXmlPrivateMemberAssignment ;
14591458 private readonly HashSet < string > _injectXmlPropertyGetter ;
14601459 private readonly HashSet < string > _injectedXmlPropertySetter ;
1460+ private readonly HashSet < string > _injectXmlMarshallCode ;
14611461 private readonly bool _skipSetter ;
14621462 private readonly bool _skipXmlIsSet ;
1463- private readonly HashSet < string > _injectXmlMarshallCode ;
14641463
14651464 internal PropertyModifier ( string modelPropertyName , JsonData modifierData )
14661465 {
@@ -1706,7 +1705,7 @@ public HashSet<string> InjectXmlUnmarshallCode
17061705 /// ]
17071706 /// }
17081707 /// </summary>
1709- public bool SkipContextTestExpressionUnmarshallingLogic { get { return _modifierData [ SkipContextTestExpressionUnmarshallingLogicKey ] != null ; } }
1708+ public bool SkipContextTestExpressionUnmarshallingLogic { get { return _modifierData [ SkipContextTestExpressionUnmarshallingLogicKey ] != null ; } }
17101709 }
17111710
17121711 #endregion
@@ -2093,91 +2092,6 @@ public string AlternateLocationName
20932092 private set ;
20942093 }
20952094 }
2096-
2097- /// <summary>
2098- /// A class that represents shapes that implement the visitor pattern.
2099- /// </summary>
2100- public class VisitorPattern
2101- {
2102- /// <summary>
2103- /// Creates a Visitor
2104- /// </summary>
2105- /// <param name="predicateName"></param>
2106- /// <param name="visitorName"></param>
2107- /// <param name="visitorParam"></param>
2108- public VisitorPattern ( string predicateName , string visitorName , string visitorParam )
2109- {
2110- PredicateName = predicateName ;
2111- VisitorName = visitorName ;
2112- VisitorParam = visitorParam ;
2113- }
2114- /// <summary>
2115- /// The name of the predicate which is typically a property of a top-level
2116- /// filter class.
2117- /// </summary>
2118- public string PredicateName
2119- {
2120- get ;
2121- private set ;
2122- }
2123-
2124- /// <summary>
2125- /// The name of the visitor which the predicate accepts.
2126- /// </summary>
2127- public string VisitorName
2128- {
2129- get ;
2130- private set ;
2131- }
2132-
2133- /// <summary>
2134- /// The argument to pass into the visitor. In XML services, this is typically
2135- /// xmlWriter.
2136- /// </summary>
2137- public string VisitorParam
2138- {
2139- get ;
2140- private set ;
2141- }
2142-
2143- /// <summary>
2144- /// This is purely to communicate back to the generator that the visitor pattern has been written.
2145- /// We want to write the visitor pattern to preserve existing behavior but in the future if more members
2146- /// are added to the structure which implements the visitor pattern, we want that to be codegened so we don't have
2147- /// to manually add the new predicates to the visitor.
2148- /// Once we write the visitor pattern in the marshaller, we set Visited to true and then proceed with normal code-gen
2149- /// for the same structure.
2150- /// </summary>
2151- public bool Visited
2152- {
2153- get ;
2154- set ;
2155- }
2156- }
2157-
2158- public bool TryGetVisitorPattern ( string shapeName , out VisitorPattern visitorPattern )
2159- {
2160- visitorPattern = null ;
2161- var data = _documentRoot [ ImplementsVisitorPatternKey ] ;
2162- if ( data != null && data [ shapeName ] != null )
2163- {
2164- string predicateName = ( string ) data [ shapeName ] [ "predicateName" ] ;
2165- string visitorName = ( string ) data [ shapeName ] [ "visitorName" ] ;
2166- string visitorParam = ( string ) data [ shapeName ] [ "visitorParam" ] ;
2167- visitorPattern = new VisitorPattern ( predicateName , visitorName , visitorParam ) ;
2168- return true ;
2169- }
2170-
2171- return false ;
2172- }
2173-
2174- public VisitorPattern GetVisitorPattern ( string shapeName )
2175- {
2176- if ( TryGetVisitorPattern ( shapeName , out VisitorPattern visitorPattern ) )
2177- return visitorPattern ;
2178- else
2179- return null ;
2180- }
21812095 #endregion
21822096
21832097 #region RuntimePipelineOverride
0 commit comments