1 using System; 2 using System.Reflection; 3 using System.Globalization; 4 using System.Resources; 5 using System.Text; 6 using System.ComponentModel; 7 using System.Workflow.Activities; 8 using System.Drawing; 9 using System.Workflow.ComponentModel.Design; 10 11 [AttributeUsage(AttributeTargets.All)] 12 internal sealed class SRDescriptionAttribute : DescriptionAttribute 13 { SRDescriptionAttribute(string description)14 public SRDescriptionAttribute(string description) 15 { 16 DescriptionValue = SR.GetString(description); 17 } 18 SRDescriptionAttribute(string description, string resourceSet)19 public SRDescriptionAttribute(string description, string resourceSet) 20 { 21 ResourceManager rm = new ResourceManager(resourceSet, Assembly.GetExecutingAssembly()); 22 DescriptionValue = rm.GetString(description); 23 System.Diagnostics.Debug.Assert(DescriptionValue != null, string.Format(CultureInfo.CurrentCulture, "String resource {0} not found.", description)); 24 } 25 } 26 27 [AttributeUsage(AttributeTargets.All)] 28 internal sealed class SRCategoryAttribute : CategoryAttribute 29 { 30 private string resourceSet = String.Empty; 31 SRCategoryAttribute(string category)32 public SRCategoryAttribute(string category) 33 : base(category) 34 { 35 } 36 SRCategoryAttribute(string category, string resourceSet)37 public SRCategoryAttribute(string category, string resourceSet) 38 : base(category) 39 { 40 this.resourceSet = resourceSet; 41 } 42 GetLocalizedString(string value)43 protected override string GetLocalizedString(string value) 44 { 45 if (this.resourceSet.Length > 0) 46 { 47 ResourceManager rm = new ResourceManager(resourceSet, Assembly.GetExecutingAssembly()); 48 String localizedString = rm.GetString(value); 49 System.Diagnostics.Debug.Assert(localizedString != null, string.Format(CultureInfo.CurrentCulture, "String resource {0} not found.", value)); 50 return localizedString; 51 } 52 else 53 { 54 return SR.GetString(value); 55 } 56 } 57 } 58 59 [AttributeUsage(AttributeTargets.All)] 60 internal sealed class SRDisplayNameAttribute : DisplayNameAttribute 61 { SRDisplayNameAttribute(string name)62 public SRDisplayNameAttribute(string name) 63 { 64 DisplayNameValue = SR.GetString(name); 65 } 66 SRDisplayNameAttribute(string name, string resourceSet)67 public SRDisplayNameAttribute(string name, string resourceSet) 68 { 69 ResourceManager rm = new ResourceManager(resourceSet, Assembly.GetExecutingAssembly()); 70 DisplayNameValue = rm.GetString(name); 71 System.Diagnostics.Debug.Assert(DisplayNameValue != null, string.Format(CultureInfo.CurrentCulture, "String resource {0} not found.", name)); 72 } 73 } 74 75 /// <summary> 76 /// AutoGenerated resource class. Usage: 77 /// 78 /// string s = SR.GetString(SR.MyIdenfitier); 79 /// </summary> 80 internal sealed class SR 81 { 82 static SR loader = null; 83 ResourceManager resources; 84 SR()85 internal SR() 86 { 87 resources = new System.Resources.ResourceManager("System.Workflow.Activities.StringResources", Assembly.GetExecutingAssembly()); 88 } 89 GetLoader()90 private static SR GetLoader() 91 { 92 if (loader == null) 93 loader = new SR(); 94 return loader; 95 } 96 97 private static CultureInfo Culture 98 { 99 get { return null/*use ResourceManager default, CultureInfo.CurrentUICulture*/; } 100 } 101 GetString(string name, params object[] args)102 internal static string GetString(string name, params object[] args) 103 { 104 return GetString(SR.Culture, name, args); 105 } GetString(CultureInfo culture, string name, params object[] args)106 internal static string GetString(CultureInfo culture, string name, params object[] args) 107 { 108 SR sys = GetLoader(); 109 if (sys == null) 110 return null; 111 string res = sys.resources.GetString(name, culture); 112 System.Diagnostics.Debug.Assert(res != null, string.Format(CultureInfo.CurrentCulture, "String resource {0} not found.", name)); 113 if (args != null && args.Length > 0) 114 { 115 return String.Format(CultureInfo.CurrentCulture, res, args); 116 } 117 else 118 { 119 return res; 120 } 121 } 122 GetString(string name)123 internal static string GetString(string name) 124 { 125 return GetString(SR.Culture, name); 126 } 127 GetString(CultureInfo culture, string name)128 internal static string GetString(CultureInfo culture, string name) 129 { 130 SR sys = GetLoader(); 131 if (sys == null) 132 return null; 133 string res = sys.resources.GetString(name, culture); 134 System.Diagnostics.Debug.Assert(res != null, string.Format(CultureInfo.CurrentCulture, "String resource {0} not found.", name)); 135 return res; 136 } 137 138 // All these strings should be present in StringResources.resx 139 internal const string Activity = "Activity"; 140 internal const string Handlers = "Handlers"; 141 internal const string Conditions = "Conditions"; 142 internal const string ConditionedActivityConditions = "ConditionedActivityConditions"; 143 internal const string CorrelationSet = "CorrelationSet"; 144 internal const string NameDescr = "NameDescr"; 145 internal const string UserCodeHandlerDescr = "UserCodeHandlerDescr"; 146 internal const string ExpressionDescr = "ExpressionDescr"; 147 internal const string ExecutionTypeDescr = "ExecutionTypeDescr"; 148 internal const string InitialChildDataDescr = "InitialChildDataDescr"; 149 internal const string ConditionDescr = "ConditionDescr"; 150 internal const string UntilConditionDescr = "UntilConditionDescr"; 151 internal const string WhenConditionDescr = "WhenConditionDescr"; 152 internal const string TargetWorkflowDescr = "TargetWorkflowDescr"; 153 internal const string InitializeCaleeDescr = "InitializeCaleeDescr"; 154 internal const string ProxyClassDescr = "ProxyClassDescr"; 155 internal const string MethodNameDescr = "MethodNameDescr"; 156 internal const string URLDescr = "URLDescr"; 157 internal const string ActivationDescr = "ActivationDescr"; 158 internal const string OnAfterMethodInvokeDescr = "OnAfterMethodInvokeDescr"; 159 internal const string OnBeforeMethodInvokeDescr = "OnBeforeMethodInvokeDescr"; 160 internal const string TypeDescr = "TypeDescr"; 161 internal const string WhileConditionDescr = "WhileConditionDescr"; 162 internal const string ReplicatorUntilConditionDescr = "ReplicatorUntilConditionDescr"; 163 internal const string DynamicUpdateConditionDescr = "DynamicUpdateConditionDescr"; 164 internal const string CorrelationSetDescr = "CorrelationSetDescr"; 165 internal const string RoleDescr = "RoleDescr"; 166 internal const string ChangingVariable = "ChangingVariable"; 167 internal const string OnInitializedDescr = "OnInitializedDescr"; 168 internal const string OnCompletedDescr = "OnCompletedDescr"; 169 internal const string Type = "Type"; 170 internal const string InterfaceTypeDescription = "InterfaceTypeDescription"; 171 internal const string InterfaceTypeFilterDescription = "InterfaceTypeFilterDescription"; 172 internal const string WebServiceMethodDescription = "WebServiceMethodDescription"; 173 internal const string ReceiveActivityNameDescription = "ReceiveActivityNameDescription"; 174 internal const string WebServiceSessionIDDescr = "WebServiceSessionIDDescr"; 175 internal const string OnAfterReceiveDescr = "OnAfterReceiveDescr"; 176 internal const string OnBeforeResponseDescr = "OnBeforeResponseDescr"; 177 internal const string OnBeforeFaultingDescr = "OnBeforeFaultingDescr"; 178 internal const string TimeoutDurationDescription = "TimeoutDurationDescription"; 179 internal const string TimeoutInitializerDescription = "TimeoutInitializerDescription"; 180 internal const string StateMachineWorkflow = "StateMachineWorkflow"; 181 internal const string SequentialWorkflow = "SequentialWorkflow"; 182 internal const string EventSink = "EventSink"; 183 internal const string RuleSetDescription = "RuleSetDescription"; 184 internal const string RuleSetDefinitionDescription = "RuleSetDefinitionDescription"; 185 internal const string ConnectorColorDescription = "ConnectorColorDescription"; 186 internal const string InitialStateImagePathDescription = "InitialStateImagePathDescription"; 187 internal const string CompletedStateImagePathDescription = "CompletedStateImagePathDescription"; 188 189 internal const string Error_ConditionalBranchParentNotConditional = "Error_ConditionalBranchParentNotConditional"; 190 internal const string Error_EventDrivenMultipleEventActivity = "Error_EventDrivenMultipleEventActivity"; 191 internal const string Error_ParameterPropertyNotSet = "Error_ParameterPropertyNotSet"; 192 internal const string Error_ListenNotAllEventDriven = "Error_ListenNotAllEventDriven"; 193 internal const string Error_InterfaceTypeNotInterface = "Error_InterfaceTypeNotInterface"; 194 internal const string Error_ParallelLessThanTwoChildren = "Error_ParallelLessThanTwoChildren"; 195 internal const string Error_PropertyNotSet = "Error_PropertyNotSet"; 196 internal const string Error_MissingCorrelationParameterAttribute = "Error_MissingCorrelationParameterAttribute"; 197 internal const string Error_MissingCorrelationTokenProperty = "Error_MissingCorrelationTokenProperty"; 198 internal const string Error_CorrelationTypeNotConsistent = "Error_CorrelationTypeNotConsistent"; 199 internal const string Error_CorrelationInvalid = "Error_CorrelationInvalid"; 200 internal const string Error_MissingMethodName = "Error_MissingMethodName"; 201 internal const string Error_MissingEventName = "Error_MissingEventName"; 202 internal const string Error_ListenLessThanTwoChildren = "Error_ListenLessThanTwoChildren"; 203 internal const string Error_MethodNotExists = "Error_MethodNotExists"; 204 internal const string General_MissingService = "General_MissingService"; 205 internal const string Error_FieldNotExists = "Error_FieldNotExists"; 206 internal const string Error_TypeNotResolved = "Error_TypeNotResolved"; 207 internal const string Error_ParameterNotFound = "Error_ParameterNotFound"; 208 internal const string Error_TypeNotExist = "Error_TypeNotExist"; 209 internal const string Error_ParallelNotAllSequence = "Error_ParallelNotAllSequence"; 210 internal const string Error_ActivationActivityNotFirst = "Error_ActivationActivityNotFirst"; 211 internal const string Error_ActivationActivityInsideLoop = "Error_ActivationActivityInsideLoop"; 212 internal const string Error_DuplicateCorrelation = "Error_DuplicateCorrelation"; 213 internal const string Error_NegativeValue = "Error_NegativeValue"; 214 internal const string Error_MustHaveParent = "Error_MustHaveParent"; 215 internal const string Error_CanNotChangeAtRuntime = "Error_CanNotChangeAtRuntime"; 216 internal const string Error_CannotNestThisActivity = "Error_CannotNestThisActivity"; 217 internal const string Error_GetCalleeWorkflow = "Error_GetCalleeWorkflow"; 218 internal const string Error_TypeIsNotRootActivity = "Error_TypeIsNotRootActivity"; 219 internal const string Error_ContextStackItemMissing = "Error_ContextStackItemMissing"; 220 internal const string Error_UnexpectedArgumentType = "Error_UnexpectedArgumentType"; 221 internal const string OnGeneratorChildCompletedDescr = "OnGeneratorChildCompletedDescr"; 222 internal const string OnGeneratorChildInitializedDescr = "OnGeneratorChildInitializedDescr"; 223 internal const string Error_WebServiceResponseNotFound = "Error_WebServiceResponseNotFound"; 224 internal const string Error_WebServiceReceiveNotFound = "Error_WebServiceReceiveNotFound"; 225 internal const string Error_WebServiceResponseNotNeeded = "Error_WebServiceResponseNotNeeded"; 226 internal const string Error_WebServiceFaultNotNeeded = "Error_WebServiceFaultNotNeeded"; 227 internal const string Error_WebServiceReceiveNotConfigured = "Error_WebServiceReceiveNotConfigured"; 228 internal const string Error_WebServiceReceiveNotMarkedActivate = "Error_WebServiceReceiveNotMarkedActivate"; 229 internal const string Error_DuplicateWebServiceResponseFound = "Error_DuplicateWebServiceResponseFound"; 230 internal const string Error_DuplicateWebServiceFaultFound = "Error_DuplicateWebServiceFaultFound"; 231 internal const string Error_CAGChildNotFound = "Error_CAGChildNotFound"; 232 internal const string Error_CAGNotExecuting = "Error_CAGNotExecuting"; 233 internal const string Error_CAGQuiet = "Error_CAGQuiet"; 234 internal const string Error_CAGDynamicUpdateNotAllowed = "Error_CAGDynamicUpdateNotAllowed"; 235 internal const string Error_MissingValidationProperty = "Error_MissingValidationProperty"; 236 internal const string Error_MissingConditionName = "Error_MissingConditionName"; 237 internal const string Error_MissingRuleConditions = "Error_MissingRuleConditions"; 238 internal const string Error_RoleProviderNotAvailableOrEnabled = "Error_RoleProviderNotAvailableOrEnabled"; 239 internal const string Error_ExternalDataExchangeServiceExists = "Error_ExternalDataExchangeServiceExists"; 240 internal const string Error_WorkflowTerminated = "Error_WorkflowTerminated"; 241 internal const string Error_WorkflowCompleted = "Error_WorkflowCompleted"; 242 internal const string Warning_AdditionalBindingsFound = "Warning_AdditionalBindingsFound"; 243 internal const string Error_ConfigurationSectionNotFound = "Error_ConfigurationSectionNotFound"; 244 internal const string Error_UnknownConfigurationParameter = "Error_UnknownConfigurationParameter"; 245 246 internal const string Error_CannotConnectToRequest = "Error_CannotConnectToRequest"; 247 248 // state machine errors 249 internal const string Error_StateChildNotFound = "Error_StateChildNotFound"; 250 251 private const string Error_InvalidStateActivityParent = "Error_InvalidStateActivityParent"; GetError_InvalidStateActivityParent()252 internal static string GetError_InvalidStateActivityParent() 253 { 254 return GetString(Error_InvalidStateActivityParent, 255 typeof(StateActivity).Name); 256 } 257 258 private const string Error_BlackBoxCustomStateNotSupported = "Error_BlackBoxCustomStateNotSupported"; GetError_BlackBoxCustomStateNotSupported()259 internal static string GetError_BlackBoxCustomStateNotSupported() 260 { 261 return GetString(Error_BlackBoxCustomStateNotSupported, 262 typeof(StateActivity).Name); 263 } 264 265 private const string Error_InvalidLeafStateChild = "Error_InvalidLeafStateChild"; GetError_InvalidLeafStateChild()266 internal static string GetError_InvalidLeafStateChild() 267 { 268 return GetString(Error_InvalidLeafStateChild, 269 typeof(StateActivity).Name, 270 typeof(EventDrivenActivity).Name, 271 typeof(StateInitializationActivity).Name, 272 typeof(StateFinalizationActivity).Name); 273 } 274 275 private const string Error_InvalidCompositeStateChild = "Error_InvalidCompositeStateChild"; GetError_InvalidCompositeStateChild()276 internal static string GetError_InvalidCompositeStateChild() 277 { 278 return GetString(Error_InvalidCompositeStateChild, 279 typeof(StateMachineWorkflowActivity).Name, 280 typeof(StateActivity).Name, 281 typeof(EventDrivenActivity).Name); 282 } 283 284 private const string Error_SetStateOnlyWorksOnStateMachineWorkflow = "Error_SetStateOnlyWorksOnStateMachineWorkflow"; GetError_SetStateOnlyWorksOnStateMachineWorkflow()285 internal static string GetError_SetStateOnlyWorksOnStateMachineWorkflow() 286 { 287 return GetString(Error_SetStateOnlyWorksOnStateMachineWorkflow, 288 typeof(SetStateActivity).Name, 289 typeof(EventDrivenActivity).Name, 290 typeof(StateInitializationActivity).Name, 291 typeof(StateMachineWorkflowActivity).Name, 292 typeof(StateActivity).Name); 293 } 294 295 private const string Error_SetStateMustPointToAState = "Error_SetStateMustPointToAState"; GetError_SetStateMustPointToAState()296 internal static string GetError_SetStateMustPointToAState() 297 { 298 return GetString(Error_SetStateMustPointToAState, 299 SetStateActivity.TargetStateNameProperty, 300 typeof(StateActivity).Name); 301 } 302 303 private const string Error_StateActivityMustBeContainedInAStateMachine = "Error_StateActivityMustBeContainedInAStateMachine"; GetError_StateActivityMustBeContainedInAStateMachine()304 internal static string GetError_StateActivityMustBeContainedInAStateMachine() 305 { 306 return GetString(Error_StateActivityMustBeContainedInAStateMachine, 307 typeof(StateActivity).Name, 308 typeof(StateMachineWorkflowActivity).Name, 309 StateMachineWorkflowActivity.InitialStateNamePropertyName); 310 } 311 312 private const string Error_CannotExecuteStateMachineWithoutInitialState = "Error_CannotExecuteStateMachineWithoutInitialState"; GetError_CannotExecuteStateMachineWithoutInitialState()313 internal static string GetError_CannotExecuteStateMachineWithoutInitialState() 314 { 315 return GetString(Error_CannotExecuteStateMachineWithoutInitialState, 316 typeof(StateMachineWorkflowActivity).Name, 317 StateMachineWorkflowActivity.InitialStateNamePropertyName); 318 } 319 GetError_InitialStateMustPointToAState()320 internal static string GetError_InitialStateMustPointToAState() 321 { 322 return GetString(Error_SetStateMustPointToAState, 323 StateMachineWorkflowActivity.InitialStateNamePropertyName, 324 typeof(StateActivity).Name); 325 } 326 GetError_CompletedStateMustPointToAState()327 internal static string GetError_CompletedStateMustPointToAState() 328 { 329 return GetString(Error_SetStateMustPointToAState, 330 StateMachineWorkflowActivity.CompletedStateNamePropertyName, 331 typeof(StateActivity).Name); 332 } 333 334 private const string Error_SetStateMustPointToALeafNodeState = "Error_SetStateMustPointToALeafNodeState"; GetError_SetStateMustPointToALeafNodeState()335 internal static string GetError_SetStateMustPointToALeafNodeState() 336 { 337 return GetString(Error_SetStateMustPointToALeafNodeState, 338 SetStateActivity.TargetStateNameProperty, 339 typeof(StateActivity).Name); 340 } 341 GetError_InitialStateMustPointToALeafNodeState()342 internal static string GetError_InitialStateMustPointToALeafNodeState() 343 { 344 return GetString(Error_SetStateMustPointToALeafNodeState, 345 StateMachineWorkflowActivity.InitialStateNameProperty, 346 typeof(StateActivity).Name); 347 } 348 GetError_CompletedStateMustPointToALeafNodeState()349 internal static string GetError_CompletedStateMustPointToALeafNodeState() 350 { 351 return GetString(Error_SetStateMustPointToALeafNodeState, 352 StateMachineWorkflowActivity.CompletedStateNamePropertyName, 353 typeof(StateActivity).Name); 354 } 355 356 private const string Error_InitialStateMustBeDifferentThanCompletedState = "Error_InitialStateMustBeDifferentThanCompletedState"; GetError_InitialStateMustBeDifferentThanCompletedState()357 internal static string GetError_InitialStateMustBeDifferentThanCompletedState() 358 { 359 return GetString(Error_InitialStateMustBeDifferentThanCompletedState, 360 StateMachineWorkflowActivity.InitialStateNameProperty, 361 StateMachineWorkflowActivity.CompletedStateNameProperty); 362 } 363 364 internal const string Error_CompletedStateCannotContainActivities = "Error_CompletedStateCannotContainActivities"; 365 366 private const string Error_StateHandlerParentNotState = "Error_StateHandlerParentNotState"; GetError_StateInitializationParentNotState()367 internal static string GetError_StateInitializationParentNotState() 368 { 369 return GetString(Error_StateHandlerParentNotState, 370 typeof(StateInitializationActivity).Name, 371 typeof(StateActivity).Name); 372 } 373 GetError_StateFinalizationParentNotState()374 internal static string GetError_StateFinalizationParentNotState() 375 { 376 return GetString(Error_StateHandlerParentNotState, 377 typeof(StateFinalizationActivity).Name, 378 typeof(StateActivity).Name); 379 } 380 381 private const string Error_EventActivityNotValidInStateHandler = "Error_EventActivityNotValidInStateHandler"; GetError_EventActivityNotValidInStateInitialization()382 internal static string GetError_EventActivityNotValidInStateInitialization() 383 { 384 return GetString(Error_EventActivityNotValidInStateHandler, 385 typeof(StateInitializationActivity).Name, 386 typeof(IEventActivity).FullName); 387 } 388 GetError_EventActivityNotValidInStateFinalization()389 internal static string GetError_EventActivityNotValidInStateFinalization() 390 { 391 return GetString(Error_EventActivityNotValidInStateHandler, 392 typeof(StateFinalizationActivity).Name, 393 typeof(IEventActivity).FullName); 394 } 395 396 private const string Error_MultipleStateHandlerActivities = "Error_MultipleStateHandlerActivities"; GetError_MultipleStateInitializationActivities()397 internal static string GetError_MultipleStateInitializationActivities() 398 { 399 return GetString(Error_MultipleStateHandlerActivities, 400 typeof(StateInitializationActivity).Name, 401 typeof(StateActivity).Name); 402 } 403 GetError_MultipleStateFinalizationActivities()404 internal static string GetError_MultipleStateFinalizationActivities() 405 { 406 return GetString(Error_MultipleStateHandlerActivities, 407 typeof(StateFinalizationActivity).Name, 408 typeof(StateActivity).Name); 409 } 410 411 private const string Error_InvalidTargetStateInStateInitialization = "Error_InvalidTargetStateInStateInitialization"; GetError_InvalidTargetStateInStateInitialization()412 internal static string GetError_InvalidTargetStateInStateInitialization() 413 { 414 return GetString(Error_InvalidTargetStateInStateInitialization, 415 typeof(SetStateActivity).Name, 416 SetStateActivity.TargetStateNamePropertyName, 417 typeof(StateActivity).Name, 418 typeof(StateInitializationActivity).Name); 419 } 420 421 private const string Error_CantRemoveState = "Error_CantRemoveState"; GetError_CantRemoveState(string stateName)422 internal static string GetError_CantRemoveState(string stateName) 423 { 424 return GetString(Error_CantRemoveState, 425 typeof(StateActivity).Name, 426 stateName); 427 } 428 429 private const string Error_CantRemoveEventDrivenFromExecutingState = "Error_CantRemoveEventDrivenFromExecutingState"; GetError_CantRemoveEventDrivenFromExecutingState(string eventDrivenName, string parentStateName)430 internal static string GetError_CantRemoveEventDrivenFromExecutingState(string eventDrivenName, string parentStateName) 431 { 432 return GetString(Error_CantRemoveEventDrivenFromExecutingState, 433 typeof(EventDrivenActivity).Name, 434 eventDrivenName, 435 typeof(StateActivity).Name, 436 parentStateName); 437 } 438 439 private const string SqlTrackingServiceRequired = "SqlTrackingServiceRequired"; GetSqlTrackingServiceRequired()440 internal static string GetSqlTrackingServiceRequired() 441 { 442 return GetString(SqlTrackingServiceRequired, 443 StateMachineWorkflowInstance.StateHistoryPropertyName, 444 typeof(System.Workflow.Runtime.Tracking.SqlTrackingService).FullName); 445 } 446 447 private const string StateMachineWorkflowMustHaveACurrentState = "StateMachineWorkflowMustHaveACurrentState"; GetStateMachineWorkflowMustHaveACurrentState()448 internal static string GetStateMachineWorkflowMustHaveACurrentState() 449 { 450 return GetString(StateMachineWorkflowMustHaveACurrentState, 451 typeof(StateMachineWorkflowActivity).Name); 452 } 453 454 private const string InvalidActivityStatus = "InvalidActivityStatus"; GetInvalidActivityStatus(System.Workflow.ComponentModel.Activity activity)455 internal static string GetInvalidActivityStatus(System.Workflow.ComponentModel.Activity activity) 456 { 457 return GetString(InvalidActivityStatus, 458 activity.ExecutionStatus, 459 activity.QualifiedName); 460 } 461 462 internal const string StateMachineWorkflowRequired = "StateMachineWorkflowRequired"; GetStateMachineWorkflowRequired()463 internal static string GetStateMachineWorkflowRequired() 464 { 465 return GetString(StateMachineWorkflowRequired, 466 typeof(StateMachineWorkflowInstance).Name, 467 typeof(StateMachineWorkflowActivity).Name); 468 } 469 470 private const string InvalidUserDataInStateChangeTrackingRecord = "InvalidUserDataInStateChangeTrackingRecord"; GetInvalidUserDataInStateChangeTrackingRecord()471 internal static string GetInvalidUserDataInStateChangeTrackingRecord() 472 { 473 return GetString(InvalidUserDataInStateChangeTrackingRecord, 474 StateActivity.StateChangeTrackingDataKey, 475 typeof(StateActivity).Name); 476 } 477 478 private const string UnableToTransitionToState = "UnableToTransitionToState"; GetUnableToTransitionToState(string stateName)479 internal static string GetUnableToTransitionToState(string stateName) 480 { 481 return GetString(UnableToTransitionToState, 482 stateName); 483 } 484 485 private const string InvalidStateTransitionPath = "InvalidStateTransitionPath"; GetInvalidStateTransitionPath()486 internal static string GetInvalidStateTransitionPath() 487 { 488 return GetString(InvalidStateTransitionPath); 489 } 490 491 private const string InvalidSetStateInStateInitialization = "InvalidSetStateInStateInitialization"; GetInvalidSetStateInStateInitialization()492 internal static string GetInvalidSetStateInStateInitialization() 493 { 494 return GetString(InvalidSetStateInStateInitialization, 495 typeof(SetStateActivity).Name, 496 typeof(StateInitializationActivity).Name); 497 } 498 499 private const string StateAlreadySubscribesToThisEvent = "StateAlreadySubscribesToThisEvent"; GetStateAlreadySubscribesToThisEvent(string stateName, IComparable queueName)500 internal static string GetStateAlreadySubscribesToThisEvent(string stateName, IComparable queueName) 501 { 502 return GetString(StateAlreadySubscribesToThisEvent, 503 typeof(StateActivity).Name, 504 stateName, 505 queueName); 506 } 507 508 private const string InvalidStateMachineAction = "InvalidStateMachineAction"; GetInvalidStateMachineAction(string stateName)509 internal static string GetInvalidStateMachineAction(string stateName) 510 { 511 return GetString(InvalidStateMachineAction, 512 typeof(StateActivity).Name, 513 typeof(StateMachineAction).Name, 514 stateName); 515 } 516 517 private const string Error_StateMachineWorkflowMustBeARootActivity = "Error_StateMachineWorkflowMustBeARootActivity"; GetError_StateMachineWorkflowMustBeARootActivity()518 internal static string GetError_StateMachineWorkflowMustBeARootActivity() 519 { 520 return GetString(Error_StateMachineWorkflowMustBeARootActivity, 521 typeof(StateMachineWorkflowActivity).Name); 522 } 523 524 internal const string EventHandlingScopeActivityDescription = "EventHandlingScopeActivityDescription"; 525 internal const string EventDrivenActivityDescription = "EventDrivenActivityDescription"; 526 internal const string Error_EventActivityIsImmutable = "Error_EventActivityIsImmutable"; 527 private const string Error_EventDrivenParentNotListen = "Error_EventDrivenParentNotListen"; GetError_EventDrivenParentNotListen()528 internal static string GetError_EventDrivenParentNotListen() 529 { 530 return GetString(Error_EventDrivenParentNotListen, 531 typeof(EventDrivenActivity).Name, 532 typeof(ListenActivity).Name, 533 typeof(EventHandlersActivity).Name, 534 typeof(StateActivity).Name, 535 typeof(StateMachineWorkflowActivity).Name); 536 } 537 538 internal const string Error_EventDrivenNoFirstActivity = "Error_EventDrivenNoFirstActivity"; 539 private const string Error_EventDrivenInvalidFirstActivity = "Error_EventDrivenInvalidFirstActivity"; GetError_EventDrivenInvalidFirstActivity()540 internal static string GetError_EventDrivenInvalidFirstActivity() 541 { 542 return GetString(Error_EventDrivenInvalidFirstActivity, 543 typeof(EventDrivenActivity).Name, 544 typeof(IEventActivity).FullName, 545 typeof(HandleExternalEventActivity).Name, 546 typeof(DelayActivity).Name); 547 } 548 549 private const string UndoSetAsInitialState = "UndoSetAsInitialState"; GetUndoSetAsInitialState(string stateName)550 internal static string GetUndoSetAsInitialState(string stateName) 551 { 552 return GetString(UndoSetAsInitialState, 553 stateName); 554 } 555 556 private const string UndoSetAsCompletedState = "UndoSetAsCompletedState"; GetUndoSetAsCompletedState(string stateName)557 internal static string GetUndoSetAsCompletedState(string stateName) 558 { 559 return GetString(UndoSetAsCompletedState, 560 stateName); 561 } 562 563 internal const string UndoSwitchViews = "UndoSwitchViews"; 564 565 private const string MoveSetState = "MoveSetState"; GetMoveSetState()566 internal static string GetMoveSetState() 567 { 568 return GetString(MoveSetState, typeof(SetStateActivity).Name); 569 } 570 571 internal const string Error_EventHandlersDeclParentNotScope = "Error_EventHandlersDeclParentNotScope"; 572 internal const string Error_EventHandlersChildNotFound = "Error_EventHandlersChildNotFound"; 573 internal const string Error_FailedToStartTheWorkflow = "Error_FailedToStartTheWorkflow"; 574 575 // workflow load errors 576 577 578 // serializer errrors 579 internal const string In = "In"; 580 internal const string Out = "Out"; 581 internal const string Ref = "Ref"; 582 internal const string Required = "Required"; 583 internal const string Optional = "Optional"; 584 internal const string Parameters = "Parameters"; 585 internal const string Properties = "Properties"; 586 internal const string Error_UninitializedCorrelation = "Error_UninitializedCorrelation"; 587 internal const string Error_InvalidIdentifier = "Error_InvalidIdentifier"; 588 internal const string Error_MoreThanOneEventHandlersDecl = "Error_MoreThanOneEventHandlersDecl"; 589 internal const string Error_MoreThanTwoActivitiesInEventHandlingScope = "Error_MoreThanTwoActivitiesInEventHandlingScope"; 590 591 //Collection Editor Resources 592 internal const string Error_ExecInAtomicScope = "Error_ExecInAtomicScope"; 593 internal const string Error_ExecWithActivationReceive = "Error_ExecWithActivationReceive"; 594 internal const string Error_DuplicateParameter = "Error_DuplicateParameter"; 595 internal const string Error_GeneratorShouldContainSingleActivity = "Error_GeneratorShouldContainSingleActivity"; 596 597 // Dynamic Validations 598 internal const string Error_DynamicActivity = "Error_DynamicActivity"; 599 internal const string Error_DynamicActivity2 = "Error_DynamicActivity2"; 600 internal const string Error_DynamicActivity3 = "Error_DynamicActivity3"; 601 602 //type filtering 603 internal const string FilterDescription_InvokeWorkflow = "FilterDescription_InvokeWorkflow"; 604 605 // Activity Category 606 internal const string Standard = "Standard"; 607 internal const string Base = "Base"; 608 609 // Themes Category 610 internal const string ForegroundCategory = "ForegroundCategory"; 611 612 // Project options dialog 613 614 //Activity Toolbox Description 615 internal const string WebServiceResponseActivityDescription = "WebServiceResponseActivityDescription"; 616 internal const string WebServiceFaultActivityDescription = "WebServiceFaultActivityDescription"; 617 internal const string WebServiceReceiveActivityDescription = "WebServiceReceiveActivityDescription"; 618 internal const string SequenceActivityDescription = "SequenceActivityDescription"; 619 internal const string CompensatableSequenceActivityDescription = "CompensatableSequenceActivityDescription"; 620 621 internal const string WhileActivityDescription = "WhileActivityDescription"; 622 internal const string ReplicatorActivityDescription = "ReplicatorActivityDescription"; 623 internal const string ScopeActivityDescription = "ScopeActivityDescription"; 624 internal const string ParallelActivityDescription = "ParallelActivityDescription"; 625 internal const string ListenActivityDescription = "ListenActivityDescription"; 626 internal const string DelayActivityDescription = "DelayActivityDescription"; 627 internal const string ConstrainedGroupActivityDescription = "ConstrainedGroupActivityDescription"; 628 internal const string ConditionalActivityDescription = "ConditionalActivityDescription"; 629 internal const string InvokeWorkflowActivityDescription = "InvokeWorkflowActivityDescription"; 630 internal const string InvokeWebServiceActivityDescription = "InvokeWebServiceActivityDescription"; 631 internal const string CodeActivityDescription = "CodeActivityDescription"; 632 internal const string SetStateActivityDescription = "SetStateActivityDescription"; 633 internal const string StateInitializationActivityDescription = "StateInitializationActivityDescription"; 634 internal const string StateFinalizationActivityDescription = "StateFinalizationActivityDescription"; 635 internal const string StateActivityDescription = "StateActivityDescription"; 636 internal const string StateMachineWorkflowActivityDescription = "StateMachineWorkflowActivityDescription"; 637 internal const string PolicyActivityDescription = "PolicyActivityDescription"; 638 639 640 internal const string Error_WhileShouldHaveOneChild = "Error_WhileShouldHaveOneChild"; 641 642 internal const string Error_ReplicatorNotExecuting = "Error_ReplicatorNotExecuting"; 643 internal const string Error_ReplicatorChildRunning = "Error_ReplicatorChildRunning"; 644 internal const string Error_ReplicatorNotInitialized = "Error_ReplicatorNotInitialized"; 645 internal const string Error_ReplicatorDisconnected = "Error_ReplicatorDisconnected"; 646 internal const string Error_InsufficientArrayPassedIn = "Error_InsufficientArrayPassedIn"; 647 internal const string Error_MultiDimensionalArray = "Error_MultiDimensionalArray"; 648 649 internal const string Error_WebServiceReceiveNotValid = "Error_WebServiceReceiveNotValid"; 650 internal const string Error_CantInvokeSelf = "Error_CantInvokeSelf"; 651 internal const string Error_TypeNotPublicSerializable = "Error_TypeNotPublicSerializable"; 652 internal const string Error_CantInvokeDesignTimeTypes = "Error_CantInvokeDesignTimeTypes"; 653 internal const string Error_TypeNotPublic = "Error_TypeNotPublic"; 654 655 656 internal const string Error_NestedConstrainedGroupConditions = "Error_NestedConstrainedGroupConditions"; 657 internal const string Error_ServiceMissingExternalDataExchangeInterface = "Error_ServiceMissingExternalDataExchangeInterface"; 658 internal const string Error_CorrelationTokenInReplicator = "Error_CorrelationTokenInReplicator"; 659 internal const string HelperExternalDataExchangeDesc = "HelperExternalDataExchangeDesc"; 660 internal const string Error_TypePropertyInvalid = "Error_TypePropertyInvalid"; 661 internal const string Error_ParameterTypeNotFound = "Error_ParameterTypeNotFound"; 662 internal const string Error_ReturnTypeNotFound = "Error_ReturnTypeNotFound"; 663 internal const string TargetStateDescription = "TargetStateDescription"; 664 internal const string InitialStateDescription = "InitialStateDescription"; 665 internal const string CompletedStateDescription = "CompletedStateDescription"; 666 internal const string Error_CorrelationTokenMissing = "Error_CorrelationTokenMissing"; 667 internal const string Error_CorrelationNotInitialized = "Error_CorrelationNotInitialized"; 668 internal const string Error_EventDeliveryFailedException = "Error_EventDeliveryFailedException"; 669 internal const string Error_EventArgumentSerializationException = "Error_EventArgumentSerializationException"; 670 internal const string Error_ExternalDataExchangeException = "Error_ExternalDataExchangeException"; 671 internal const string Error_EventNameMissing = "Error_EventNameMissing"; 672 internal const string Error_CorrelationParameterException = "Error_CorrelationParameterException"; 673 internal const string Error_NoInstanceInSession = "Error_NoInstanceInSession"; 674 internal const string Error_ServiceNotFound = "Error_ServiceNotFound"; 675 internal const string Error_MissingInterfaceType = "Error_MissingInterfaceType"; 676 internal const string Error_CorrelationAttributeInvalid = "Error_CorrelationAttributeInvalid"; 677 internal const string Error_DuplicateCorrelationAttribute = "Error_DuplicateCorrelationAttribute"; 678 internal const string Error_CorrelationParameterNotFound = "Error_CorrelationParameterNotFound"; 679 internal const string Error_CorrelationInitializerNotDefinied = "Error_CorrelationInitializerNotDefinied"; 680 internal const string Error_InvalidMethodPropertyName = "Error_InvalidMethodPropertyName"; 681 internal const string Error_InvalidEventPropertyName = "Error_InvalidEventPropertyName"; 682 internal const string Error_CorrelationTokenSpecifiedForUncorrelatedInterface = "Error_CorrelationTokenSpecifiedForUncorrelatedInterface"; 683 internal const string Error_MissingCorrelationTokenOwnerNameProperty = "Error_MissingCorrelationTokenOwnerNameProperty"; 684 internal const string Error_OwnerActivityIsNotParent = "Error_OwnerActivityIsNotParent"; 685 internal const string Error_InvalidEventArgsSignature = "Error_InvalidEventArgsSignature"; 686 internal const string Error_NoMatchingActiveDirectoryEntry = "Error_NoMatchingActiveDirectoryEntry"; 687 internal const string WorkflowAuthorizationException = "WorkflowAuthorizationException"; 688 internal const string Error_InvalidEventMessage = "Error_InvalidEventMessage"; 689 internal const string Error_ExternalRuntimeContainerNotFound = "Error_ExternalRuntimeContainerNotFound"; 690 internal const string ExternalMethodNameDescr = "ExternalMethodNameDescr"; 691 internal const string ExternalEventNameDescr = "ExternalEventNameDescr"; 692 internal const string Error_MisMatchCorrelationTokenOwnerNameProperty = "Error_MisMatchCorrelationTokenOwnerNameProperty"; 693 internal const string Error_WebServiceInputNotProcessed = "Error_WebServiceInputNotProcessed"; 694 internal const string Error_CallExternalMethodArgsSerializationException = "Error_CallExternalMethodArgsSerializationException"; 695 internal const string InvokeParameterDescription = "InvokeParameterDescription"; 696 internal const string Error_ParameterTypeResolution = "Error_ParameterTypeResolution"; 697 internal const string ParameterDescription = "ParameterDescription"; 698 internal const string Error_DuplicatedActivityID = "Error_DuplicatedActivityID"; 699 internal const string Error_InvalidLanguageIdentifier = "Error_InvalidLanguageIdentifier"; 700 internal const string Error_ConditionalDeclNotAllConditionalBranchDecl = "Error_ConditionalDeclNotAllConditionalBranchDecl"; 701 internal const string Error_ConditionalLessThanOneChildren = "Error_ConditionalLessThanOneChildren"; 702 internal const string Error_ConditionalBranchUpdateAtRuntime = "Error_ConditionalBranchUpdateAtRuntime"; 703 internal const string Error_ReplicatorInvalidExecutionType = "Error_ReplicatorInvalidExecutionType"; 704 internal const string Error_ReplicatorCannotCancelChild = "Error_ReplicatorCannotCancelChild"; 705 internal const string Error_InvalidCAGActivityType = "Error_InvalidCAGActivityType"; 706 internal const string Error_CorrelationViolationException = "Error_CorrelationViolationException"; 707 internal const string Error_CannotResolveWebServiceInput = "Error_CannotResolveWebServiceInput"; 708 internal const string Error_InvalidLocalServiceMessage = "Error_InvalidLocalServiceMessage"; 709 internal const string Error_InitializerInReplicator = "Error_InitializerInReplicator"; 710 internal const string CodeConditionDisplayName = "CodeConditionDisplayName"; 711 internal const string RuleConditionDisplayName = "RuleConditionDisplayName"; 712 internal const string Error_InterfaceTypeNeedsExternalDataExchangeAttribute = "Error_InterfaceTypeNeedsExternalDataExchangeAttribute"; 713 internal const string Error_WorkflowInstanceDehydratedBeforeSendingResponse = "Error_InstanceDehydratedBeforeSendingResponse"; 714 internal const string Error_InitializerFollowerInTxnlScope = "Error_InitializerFollowerInTxnlScope"; 715 internal const string ShowingExternalDataExchangeService = "ShowingExternalDataExchangeService"; 716 internal const string InterfaceTypeMissing = "InterfaceTypeMissing"; 717 internal const string MethodNameMissing = "MethodNameMissing"; 718 internal const string MethodInfoMissing = "MethodInfoMissing"; 719 internal const string EventNameMissing = "EventNameMissing"; 720 internal const string EventInfoMissing = "EventInfoMissing"; 721 internal const string HandleExternalEventActivityDescription = "HandleExternalEventActivityDescription"; 722 internal const string CallExternalMethodActivityDescription = "CallExternalMethodActivityDescription"; 723 internal const string Error_EventArgumentValidationException = "Error_EventArgumentValidationException"; 724 internal const string Error_GenericMethodsNotSupported = "Error_GenericMethodsNotSupported"; 725 internal const string Error_ReturnTypeNotVoid = "Error_ReturnTypeNotVoid"; 726 internal const string Error_OutRefParameterNotSupported = "Error_OutRefParameterNotSupported"; 727 internal const string InvalidTimespanFormat = "InvalidTimespanFormat"; 728 internal const string Error_CantFindInstance = "Error_CantFindInstance"; 729 730 internal static string Error_SenderMustBeActivityExecutionContext 731 { 732 get 733 { 734 return GetString("Error_SenderMustBeActivityExecutionContext", typeof(System.Workflow.ComponentModel.ActivityExecutionContext).FullName); 735 } 736 } 737 } 738 739