public FSMStateMachineLogic(System.Type stateClass, FSMStateMachine ownerSM, FSMStateMachineLogic parent) { m_ChildrenTypes = new List<System.Type>(); m_StateClass = stateClass; m_OwnerSM = ownerSM; m_Parent = parent; }
/// <summary> /// Constructs a new /// <code>EnumConstantNotPresentException</code> /// with the current /// stack trace and a detail message based on the specified enum type and /// missing constant name. /// </summary> /// <param name="enumType">the enum type.</param> /// <param name="constantName">the missing constant name.</param> public EnumConstantNotPresentException(System.Type enumType_1, string constantName_1 ) : base("enum constant " + enumType_1.FullName + "." + constantName_1 + " is missing" ) { this._enumType = enumType_1; this._constantName = constantName_1; }
protected virtual void WriteDataContextCtors(CodeWriter writer, Database schema, Type contextBaseType, GenerationContext context) { // ctor taking a connections tring WriteDataContextCtor(writer, schema, contextBaseType, new[] { new ParameterDefinition { Name = "connectionString", Type = typeof(string) } }, new[] { "connectionString" }, new[] { typeof(string) }, context); // the two constructors below have the same prototype, so they are mutually exclusive // the base class requires a IVendor if (!WriteDataContextCtor(writer, schema, contextBaseType, new[] { new ParameterDefinition { Name = "connection", Type = typeof(IDbConnection) } }, new[] { "connection", writer.GetNewExpression(writer.GetMethodCallExpression(writer.GetLiteralFullType(context.SchemaLoader.Vendor.GetType()))) }, new[] { typeof(IDbConnection), typeof(IVendor) }, context)) { // OR the base class requires no IVendor WriteDataContextCtor(writer, schema, contextBaseType, new[] { new ParameterDefinition { Name = "connection", Type = typeof(IDbConnection) } }, new[] { "connection" }, new[] { typeof(IDbConnection) }, context); } // ctor(string, MappingSource) WriteDataContextCtor(writer, schema, contextBaseType, new[] { new ParameterDefinition { Name = "connection", Type = typeof(string) }, new ParameterDefinition { Name = "mappingSource", Type = typeof(MappingSource) }, }, new[] { "connection", "mappingSource" }, new[] { typeof(string), typeof (MappingSource) }, context); // ctor(IDbConnection, MappingSource) WriteDataContextCtor(writer, schema, contextBaseType, new[] { new ParameterDefinition { Name = "connection", Type = typeof(IDbConnection) }, new ParameterDefinition { Name = "mappingSource", Type = typeof(MappingSource) }, }, new[] { "connection", "mappingSource" }, new[] { typeof(IDbConnection), typeof(MappingSource) }, context); // just in case you'd like to specify another vendor than the one who helped generating this file WriteDataContextCtor(writer, schema, contextBaseType, new[] { new ParameterDefinition { Name = "connection", Type = typeof(IDbConnection) }, new ParameterDefinition { Name = "vendor", Type = typeof(IVendor) }, }, new[] { "connection", "vendor" }, new[] { typeof(IDbConnection), typeof(IVendor) }, context); WriteDataContextCtor(writer, schema, contextBaseType, new[] { new ParameterDefinition { Name = "connection", Type = typeof(IDbConnection) }, new ParameterDefinition { Name = "mappingSource", Type = typeof(MappingSource) }, new ParameterDefinition { Name = "vendor", Type = typeof(IVendor) }, }, new[] { "connection", "mappingSource", "vendor" }, new[] { typeof(IDbConnection), typeof(MappingSource), typeof(IVendor) }, context); }
//Construct public GraphSerializationData(Graph graph) { this.version = SerializationVersion; this.type = graph.GetType(); this.name = graph.name; this.comments = graph.graphComments; this.translation = graph.translation; this.zoomFactor = graph.zoomFactor; this.nodes = graph.allNodes; this.canvasGroups = graph.canvasGroups; this.localBlackboard = graph.localBlackboard; var structConnections = new List<Connection>(); for (var i = 0; i < nodes.Count; i++){ if (nodes[i] is ISerializationCallbackReceiver){ (nodes[i] as ISerializationCallbackReceiver).OnBeforeSerialize(); } for (var j = 0; j < nodes[i].outConnections.Count; j++){ structConnections.Add(nodes[i].outConnections[j]); } } this.connections = structConnections; this.primeNode = graph.primeNode; }
public Given_an_OdcmClass_Entity_Derived() { base.Init(m => { var @namespace = m.Namespaces[0]; var derivedClass = @namespace.Classes.First(); _baseClass = Any.OdcmEntityClass(@namespace); @namespace.Types.Add(_baseClass); derivedClass.Base = _baseClass; if (!_baseClass.Derived.Contains(derivedClass)) { _baseClass.Derived.Add(derivedClass); } }); _baseConcreteType = Proxy.GetClass(_baseClass.Namespace, _baseClass.Name); _baseConcreteInterface = Proxy.GetInterface(_baseClass.Namespace, "I" + _baseClass.Name); _baseFetcherType = Proxy.GetClass(_baseClass.Namespace, _baseClass.Name + "Fetcher"); _baseFetcherInterface = Proxy.GetInterface(_baseClass.Namespace, "I" + _baseClass.Name + "Fetcher"); _baseCollectionType = Proxy.GetClass(_baseClass.Namespace, _baseClass.Name + "Collection"); _baseCollectionInterface = Proxy.GetInterface(_baseClass.Namespace, "I" + _baseClass.Name + "Collection"); _toDerivedMethodName = "To" + ConcreteType.Name; }
//////////////////////////////////////// ///////////GUI AND EDITOR STUFF///////// //////////////////////////////////////// protected override void OnTaskInspectorGUI() { if (!Application.isPlaying && GUILayout.Button("Select Field")){ System.Action<FieldInfo> FieldSelected = (field)=> { targetType = field.DeclaringType; fieldName = field.Name; saveAs.SetType(field.FieldType); }; if (agent != null){ EditorUtils.ShowGameObjectFieldSelectionMenu(agent.gameObject, typeof(object), FieldSelected); } else { var menu = new UnityEditor.GenericMenu(); foreach (var t in UserTypePrefs.GetPreferedTypesList(typeof(Component), true)) menu = EditorUtils.GetFieldSelectionMenu(t, typeof(object), FieldSelected, menu); menu.ShowAsContext(); Event.current.Use(); } } if (agentType != null && !string.IsNullOrEmpty(fieldName)){ GUILayout.BeginVertical("box"); UnityEditor.EditorGUILayout.LabelField("Type", agentType.Name); UnityEditor.EditorGUILayout.LabelField("Field", fieldName); UnityEditor.EditorGUILayout.LabelField("Field Type", saveAs.varType.FriendlyName() ); GUILayout.EndVertical(); EditorUtils.BBParameterField("Save As", saveAs, true); } }
static FGConsole() { consoleWindowType = typeof(EditorWindow).Assembly.GetType("UnityEditor.ConsoleWindow"); if (consoleWindowType != null) { consoleWindowField = consoleWindowType.GetField("ms_ConsoleWindow", BindingFlags.Static | BindingFlags.NonPublic | BindingFlags.Public); consoleListViewField = consoleWindowType.GetField("m_ListView", BindingFlags.Instance | BindingFlags.NonPublic | BindingFlags.Public); consoleLVHeightField = consoleWindowType.GetField("ms_LVHeight", BindingFlags.Instance | BindingFlags.NonPublic | BindingFlags.Public); consoleActiveTextField = consoleWindowType.GetField("m_ActiveText", BindingFlags.Instance | BindingFlags.NonPublic | BindingFlags.Public); consoleOnGUIMethod = consoleWindowType.GetMethod("OnGUI", BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Instance); } listViewStateType = typeof(EditorWindow).Assembly.GetType("UnityEditor.ListViewState"); if (listViewStateType != null) { listViewStateRowField = listViewStateType.GetField("row", BindingFlags.Instance | BindingFlags.NonPublic | BindingFlags.Public); } editorWindowPosField = typeof(EditorWindow).GetField("m_Pos", BindingFlags.Instance | BindingFlags.NonPublic | BindingFlags.Public); logEntriesType = typeof(EditorWindow).Assembly.GetType("UnityEditorInternal.LogEntries"); if (logEntriesType != null) { getEntryMethod = logEntriesType.GetMethod("GetEntryInternal", BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Static); startGettingEntriesMethod = logEntriesType.GetMethod("StartGettingEntries", BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Static); endGettingEntriesMethod = logEntriesType.GetMethod("EndGettingEntries", BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Static); } logEntryType = typeof(EditorWindow).Assembly.GetType("UnityEditorInternal.LogEntry"); if (logEntryType != null) { logEntry = System.Activator.CreateInstance(logEntryType); logEntryFileField = logEntryType.GetField("file", BindingFlags.Instance | BindingFlags.NonPublic | BindingFlags.Public); logEntryLineField = logEntryType.GetField("line", BindingFlags.Instance | BindingFlags.NonPublic | BindingFlags.Public); logEntryInstanceIDField = logEntryType.GetField("instanceID", BindingFlags.Instance | BindingFlags.NonPublic | BindingFlags.Public); } }
/// <summary> /// /// </summary> /// <param name="column"></param> public AdoColumn(DataColumn column) { name = column.ColumnName; type = column.DataType; columnSize = column.MaxLength; isNullable = column.AllowDBNull; }
public SecondaryTableSecondPass(EntityBinder entityBinder, IPropertyHolder propertyHolder, System.Type annotatedClass) { this.entityBinder = entityBinder; this.propertyHolder = propertyHolder; this.annotatedClass = annotatedClass; }
public void GetPlugIns() { System.Type[] plugInInterfaces = new System.Type[] { typeof(PlugInInterface1), typeof(PlugInInterface2), typeof(PlugInInterface3) }; IInfo[] plugIns = Info.GetPlugIns(Assembly.GetExecutingAssembly(), plugInInterfaces); List<IInfo> expectedPlugIns = new List<IInfo>(); expectedPlugIns.Add(new Info("PlugIn1A", typeof(PlugInInterface1), typeof(PlugIn1A).AssemblyQualifiedName)); expectedPlugIns.Add(new Info("PlugIn1-Blue", typeof(PlugInInterface1), typeof(PlugIn1Blue).AssemblyQualifiedName)); expectedPlugIns.Add(new Info("PlugIn2A", typeof(PlugInInterface2), typeof(PlugIn2A).AssemblyQualifiedName)); Assert.AreEqual(expectedPlugIns.Count, plugIns.Length); foreach (IInfo plugIn in plugIns) AssertPlugInIsExpected(plugIn, expectedPlugIns); }
//////////////////////////////////////// ///////////GUI AND EDITOR STUFF///////// //////////////////////////////////////// protected override void OnTaskInspectorGUI() { if (!Application.isPlaying && GUILayout.Button("Select Field")){ System.Action<FieldInfo> FieldSelected = (field)=>{ targetType = field.DeclaringType; fieldName = field.Name; setValue.SetType(field.FieldType); }; var menu = new UnityEditor.GenericMenu(); if (agent != null){ foreach(var comp in agent.GetComponents(typeof(Component)).Where(c => c.hideFlags == 0) ){ menu = EditorUtils.GetFieldSelectionMenu(comp.GetType(), typeof(object), FieldSelected, menu); } menu.AddSeparator("/"); } foreach (var t in UserTypePrefs.GetPreferedTypesList(typeof(Component), true)){ menu = EditorUtils.GetFieldSelectionMenu(t, typeof(object), FieldSelected, menu); } menu.ShowAsContext(); Event.current.Use(); } if (agentType != null && !string.IsNullOrEmpty(fieldName)){ GUILayout.BeginVertical("box"); UnityEditor.EditorGUILayout.LabelField("Type", agentType.Name); UnityEditor.EditorGUILayout.LabelField("Field", fieldName); UnityEditor.EditorGUILayout.LabelField("Field Type", setValue.varType.FriendlyName() ); GUILayout.EndVertical(); EditorUtils.BBParameterField("Set Value", setValue); } }
// ------------------------------------------------------------------------ public MdaIntropsector(System.Type clss, IList<MethodRecognizer> methodsRecognizers) { this.clss = clss; this.methodsRecognizers = methodsRecognizers; runMethodRecognizers(); buildPropMethodsDescriptors(); }
//////////////////////////////////////// ///////////GUI AND EDITOR STUFF///////// //////////////////////////////////////// protected override void OnTaskInspectorGUI() { if (!Application.isPlaying && GUILayout.Button("Select Field")){ System.Action<FieldInfo> FieldSelected = (field)=> { targetType = field.DeclaringType; fieldName = field.Name; checkValue = BBParameter.CreateInstance(field.FieldType, blackboard); comparison = CompareMethod.EqualTo; }; if (agent != null){ EditorUtils.ShowGameObjectFieldSelectionMenu(agent.gameObject, typeof(object), FieldSelected); } else { var menu = new UnityEditor.GenericMenu(); foreach (var t in UserTypePrefs.GetPreferedTypesList(typeof(Component), true)) menu = EditorUtils.GetFieldSelectionMenu(t, typeof(object), FieldSelected, menu); menu.ShowAsContext(); Event.current.Use(); } } if (agentType != null && !string.IsNullOrEmpty(fieldName)){ GUILayout.BeginVertical("box"); UnityEditor.EditorGUILayout.LabelField("Type", agentType.FriendlyName()); UnityEditor.EditorGUILayout.LabelField("Field", fieldName); GUILayout.EndVertical(); GUI.enabled = checkValue.varType == typeof(float) || checkValue.varType == typeof(int); comparison = (CompareMethod)UnityEditor.EditorGUILayout.EnumPopup("Comparison", comparison); GUI.enabled = true; EditorUtils.BBParameterField("Value", checkValue); } }
//--------------------------------------------------------------------- //!< Create a grid. protected GridWithType(uint rows, uint columns, System.Type dataType) : base(rows, columns) { this.dataType = dataType; }
private void StartOnGUI(SerializedProperty property, GUIContent label) { _currentProp = property; _label = label; _currentKeysProp = _currentProp.FindPropertyRelative("_keys"); _currentValuesProp = _currentProp.FindPropertyRelative("_values"); _currentValuesProp.arraySize = _currentKeysProp.arraySize; _lst = CachedReorderableList.GetListDrawer(_currentKeysProp, _lst_DrawHeader, _lst_DrawElement, _lst_OnAdd, _lst_OnRemove); //_lst.draggable = false; if(this.fieldInfo != null) { var attrib = this.fieldInfo.GetCustomAttributes(typeof(VariantCollection.AsPropertyListAttribute), false).FirstOrDefault() as VariantCollection.AsPropertyListAttribute; _propertyListTargetType = (attrib != null) ? attrib.TargetType : null; if(attrib != null && attrib.TargetType != null) { _propertyListTargetType = attrib.TargetType; _propertyListMembers = (from m in DynamicUtil.GetEasilySerializedMembersFromType(_propertyListTargetType, System.Reflection.MemberTypes.Field | System.Reflection.MemberTypes.Property, DynamicMemberAccess.Write) select m).ToArray(); _propertyListNames = (from m in _propertyListMembers select m.Name).ToArray(); } } }
protected LuceneWork(object id, string idInString, System.Type entityClass, Document document) { this.id = id; this.idInString = idInString; this.entityClass = entityClass; this.document = document; }
public FSMStateMachineLogic(FSMStateType stateType, List<System.Type> childrenTypes, FSMStateMachine ownerSM, FSMStateMachineLogic parent) { m_StateClass = null; m_StateType = stateType; m_ChildrenTypes = childrenTypes; m_Parent = parent; m_OwnerSM = ownerSM; }
public AnimationWindowHierarchyNode(int instanceID, int depth, TreeViewItem parent, System.Type animatableObjectType, string propertyName, string path, string displayName) : base(instanceID, depth, parent, displayName) { this.displayName = displayName; this.animatableObjectType = animatableObjectType; this.propertyName = propertyName; this.path = path; }
/// <summary> /// 窗口信息 /// </summary> /// <param name="key">标识</param> /// <param name="t">宿主脚本</param> /// <param name="resName">资源名称,如果resName为null取key.tostring()</param> /// <param name="wType">窗口类型</param> /// <param name="wEffect">窗口效果</param> public UIWindowInfo(UIType key, System.Type t, string resName = "", UIWindowType wType = UIWindowType.ModelType, UIWindowEffect wEffect = UIWindowEffect.Default) { Key = key; Owner = t; WinType = wType; WinEffect = wEffect; mResourceName = resName; }
public void ShowDialog(System.Type t, string folder) { this.type = t; this.folder = folder; gameObject.SetActive (true); UpdateView (); }
protected override Expression VisitMethodCall(MethodCallExpression m) { //this is a naive implementation and will not work for any OfType calls not called on root entity if (m.Method.Name == "OfType") this.castedType = m.Method.GetGenericArguments()[0]; return base.VisitMethodCall(m); }
//--------------------------------------------------------------------- /// <summary> /// Initializes a new instance of plug-in information. /// </summary> /// <param name="name">Name of the plug-in.</param> /// <param name="interfaceType">The type of the plug-in's interface /// </param> /// <param name="implementationName">The AssemblyQualifiedName of the /// class that implements the plug-in.</param> public Info(string name, System.Type interfaceType, string implementationName) { this.name = name; this.interfaceType = interfaceType; this.implementationName = implementationName; }
void IComponentChoiceSelector.BeforeGUI(SelectableComponentPropertyDrawer drawer, SerializedProperty property, System.Type restrictionType) { _drawer = drawer; _property = property; _restrictionType = restrictionType; _components = this.DoGetComponents(); this.OnBeforeGUI(); }
public AnimationClipCurveData(EditorCurveBinding binding) { this.path = binding.path; this.type = binding.type; this.propertyName = binding.propertyName; this.curve = (AnimationCurve) null; this.classID = binding.m_ClassID; this.scriptInstanceID = binding.m_ScriptInstanceID; }
/// <summary> /// Constructs a new /// <code>IllegalFormatConversionException</code> /// with the class /// of the mismatched conversion and corresponding parameter. /// </summary> /// <param name="c">the class of the mismatched conversion.</param> /// <param name="arg">the corresponding parameter.</param> public IllegalFormatConversionException(char c, System.Type arg) { this.c = c; if (arg == null) { throw new System.ArgumentNullException(); } this.arg = arg; }
public ParserCompareDefinition() { use_variable = false; if_present = false; type = null; operation = null; value = null; var_name = null; }
public FieldInfo(string name, System.Type clazz, bool isPublic, bool isStatic, bool isTransient) { _name = name; _clazz = clazz; _isPublic = isPublic; _isStatic = isStatic; _isTransient = isTransient; }
public HLAInteractionParameter(HLAInteractionParameter param) { this.Name = param.Name; this.NameNotes = param.NameNotes; this.dataType = param.DataType; this.dataTypeNotes = param.DataTypeNotes; this.semantics = param.Semantics; this.semanticsNotes = param.SemanticsNotes; this.nativeType = param.NativeType; }
//--------------------------------------------------------------------- private PixelType(DataType gdalType, System.Type systemType, int sizeOf, string description) { this.GDALType = gdalType; this.SystemType = systemType; this.SizeOf = sizeOf; this.Description = description; }
public virtual Sybase.PowerBuilder.PBString getdetailmessage() { Sybase.PowerBuilder.IPBValue[] __PBNIInteralArgs = new Sybase.PowerBuilder.IPBValue[0]; System.Type[] __PBNIInteralArgTypes = new System.Type[0]; bool[] __PBNIInteralArgsByRef = new bool[0]; Sybase.PowerBuilder.IPBValue __PBNIInteralReturn = new Sybase.PowerBuilder.PBString(); _object.Invoke(2, __PBNIInteralArgs, __PBNIInteralArgTypes, __PBNIInteralArgsByRef, ref __PBNIInteralReturn, typeof(Sybase.PowerBuilder.PBString)); return (Sybase.PowerBuilder.PBString)__PBNIInteralReturn; }
public TagFilterAttribute(System.Type type) { tagType = type; }
public static Object ObjectField(string label, Object obj, System.Type objType, bool allowSceneObjects, bool assetsMustBeInResourcesFolder) { return(ObjectField(new GUIContent(label), obj, objType, allowSceneObjects, assetsMustBeInResourcesFolder)); }
/// <summary> /// Returns if objectType can be converted to ProvisioningState by the /// converter. /// </summary> public override bool CanConvert(System.Type objectType) { return(typeof(ProvisioningState).GetTypeInfo().IsAssignableFrom(objectType.GetTypeInfo())); }
public static object GetValue(this Microsoft.Extensions.Configuration.IConfiguration configuration, [System.Diagnostics.CodeAnalysis.DynamicallyAccessedMembersAttribute(System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes.All)] System.Type type, string key, object defaultValue) { throw null; }
protected virtual IEnumerator DoLoadAssetsAsync(IProgressPromise <float, Object[]> promise, System.Type type, params string[] paths) { List <Object> results = new List <Object>(); Dictionary <string, List <string> > groups = new Dictionary <string, List <string> >(); List <string> bundleNames = new List <string>(); foreach (string path in paths) { AssetPathInfo pathInfo = this.pathInfoParser.Parse(path); if (pathInfo == null || pathInfo.BundleName == null) { if (log.IsWarnEnabled) { log.WarnFormat("Not found the AssetBundle or parses the path info '{0}' failure.", path); } continue; } var asset = this.GetCache <Object>(path); if (asset != null) { results.Add(asset); continue; } List <string> list = null; if (!groups.TryGetValue(pathInfo.BundleName, out list)) { list = new List <string>(); groups.Add(pathInfo.BundleName, list); bundleNames.Add(pathInfo.BundleName); } if (!list.Contains(pathInfo.AssetName)) { list.Add(pathInfo.AssetName); } } if (bundleNames.Count <= 0) { promise.UpdateProgress(1f); promise.SetResult(results.ToArray()); yield break; } IProgressResult <float, IBundle[]> bundleResult = this.LoadBundle(bundleNames.ToArray(), 0); float weight = bundleResult.IsDone ? 0f : DEFAULT_WEIGHT; bundleResult.Callbackable().OnProgressCallback(p => promise.UpdateProgress(weight * p)); yield return(bundleResult.WaitForDone()); if (bundleResult.Exception != null) { promise.SetException(bundleResult.Exception); yield break; } Dictionary <string, IProgressResult <float, Object[]> > assetResults = new Dictionary <string, IProgressResult <float, Object[]> >(); IBundle[] bundles = bundleResult.Result; for (int i = 0; i < bundles.Length; i++) { using (IBundle bundle = bundles[i]) { if (!groups.ContainsKey(bundle.Name)) { continue; } List <string> assetNames = groups[bundle.Name]; if (assetNames == null || assetNames.Count < 0) { continue; } IProgressResult <float, Object[]> assetResult = bundle.LoadAssetsAsync(type, assetNames.ToArray()); assetResult.Callbackable().OnCallback(ar => { if (ar.Exception != null) { return; } results.AddRange(ar.Result); }); assetResults.Add(bundle.Name, assetResult); } } if (assetResults.Count < 0) { promise.UpdateProgress(1f); promise.SetResult(results.ToArray()); yield break; } bool finished = false; float progress = 0f; int assetCount = assetResults.Count; do { yield return(waitForSeconds); finished = true; progress = 0f; var assetEnumerator = assetResults.GetEnumerator(); while (assetEnumerator.MoveNext()) { var kv = assetEnumerator.Current; var assetResult = kv.Value; if (!assetResult.IsDone) { finished = false; } progress += (1f - weight) * assetResult.Progress / assetCount; } promise.UpdateProgress(weight + progress); } while (!finished); promise.UpdateProgress(1f); promise.SetResult(results.ToArray()); }
public override Azure.Core.GeoJson.GeoObject Read(ref System.Text.Json.Utf8JsonReader reader, System.Type typeToConvert, System.Text.Json.JsonSerializerOptions options) { throw null; }
public MenuItemData(Patch patch, System.Type type) { this.patch = patch; this.type = type; }
public ConsoleLogger(System.Type type) { _owner = type.Name; }
public System.Threading.Tasks.Task <System.Threading.Channels.ChannelReader <object> > StreamAsChannelCoreAsync(string methodName, System.Type returnType, object[] args, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
public System.Threading.Tasks.Task <object> InvokeCoreAsync(string methodName, System.Type returnType, object[] args, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
public static Microsoft.AspNetCore.Builder.IEndpointConventionBuilder MapBlazorHub(this Microsoft.AspNetCore.Routing.IEndpointRouteBuilder endpoints, System.Type componentType, string selector, string path) { throw null; }
public virtual IProgressResult <float, Object[]> LoadAllAssetsAsync(string bundleName, System.Type type) { try { if (bundleName == null) { throw new System.ArgumentNullException("bundleName"); } if (type == null) { throw new System.ArgumentNullException("type"); } ProgressResult <float, Object[]> result = new ProgressResult <float, Object[]>(); IProgressResult <float, IBundle> bundleResult = this.LoadBundle(bundleName); float weight = bundleResult.IsDone ? 0f : DEFAULT_WEIGHT; bundleResult.Callbackable().OnProgressCallback(p => result.UpdateProgress(p * weight)); bundleResult.Callbackable().OnCallback((r) => { if (r.Exception != null) { result.SetException(r.Exception); return; } using (IBundle bundle = r.Result) { IProgressResult <float, Object[]> assetResult = bundle.LoadAllAssetsAsync(type); assetResult.Callbackable().OnProgressCallback(p => result.UpdateProgress(weight + (1f - weight) * p)); assetResult.Callbackable().OnCallback((ar) => { if (ar.Exception != null) { result.SetException(ar.Exception); } else { result.SetResult(ar.Result); } }); } }); return(result); } catch (System.Exception e) { return(new ImmutableProgressResult <float, Object[]>(e, 0f)); } }
public virtual IProgressResult <float, Object> LoadAssetAsync(string path, System.Type type) { try { if (string.IsNullOrEmpty(path)) { throw new System.ArgumentNullException("path", "The path is null or empty!"); } if (type == null) { throw new System.ArgumentNullException("type"); } ProgressResult <float, Object> result = new ProgressResult <float, Object>(); AssetPathInfo pathInfo = this.pathInfoParser.Parse(path); if (pathInfo == null) { throw new System.Exception(string.Format("Not found the AssetBundle or parses the path info '{0}' failure.", path)); } Object asset = this.GetCache <Object>(path); if (asset != null) { result.UpdateProgress(1f); result.SetResult(asset); return(result); } IProgressResult <float, IBundle> bundleResult = this.LoadBundle(pathInfo.BundleName); float weight = bundleResult.IsDone ? 0f : DEFAULT_WEIGHT; bundleResult.Callbackable().OnProgressCallback(p => result.UpdateProgress(p * weight)); bundleResult.Callbackable().OnCallback((r) => { if (r.Exception != null) { result.SetException(r.Exception); return; } using (IBundle bundle = r.Result) { IProgressResult <float, Object> assetResult = bundle.LoadAssetAsync(pathInfo.AssetName, type); assetResult.Callbackable().OnProgressCallback(p => result.UpdateProgress(weight + (1f - weight) * p)); assetResult.Callbackable().OnCallback((ar) => { if (ar.Exception != null) { result.SetException(ar.Exception); } else { result.SetResult(ar.Result); this.AddCache <Object>(path, ar.Result); } }); } }); return(result); } catch (System.Exception e) { return(new ImmutableProgressResult <float, Object>(e, 0f)); } }
public static object Get(this Microsoft.Extensions.Configuration.IConfiguration configuration, System.Type type) { throw null; }
public object Convert(object value, System.Type targetType, object parameter, System.Globalization.CultureInfo culture) { bool boolValue = (bool)value; return(boolValue ? TrueValue : FalseValue); }
private void ApplyDefaultAsList(SerializedProperty property, System.Type elementType, bool bUseEntity) { if (property.arraySize != 0) { return; } if (TypeUtil.IsType(elementType, typeof(Component))) { using (var lst = TempCollection.GetList <Component>()) { var targ = GameObjectUtil.GetGameObjectFromSource(property.serializedObject.targetObject); if (targ != null) { if (bUseEntity) { targ.FindComponents(elementType, lst, true); } else { targ.GetComponents(elementType, lst); } } property.arraySize = lst.Count; for (int i = 0; i < lst.Count; i++) { property.GetArrayElementAtIndex(i).objectReferenceValue = lst[i]; } property.serializedObject.ApplyModifiedProperties(); } } else if (TypeUtil.IsType(elementType, typeof(GameObject))) { var targ = GameObjectUtil.GetGameObjectFromSource(property.serializedObject.targetObject); if (targ != null) { if (bUseEntity) { property.arraySize = 1; property.GetArrayElementAtIndex(0).objectReferenceValue = targ.FindRoot(); } else { property.arraySize = 1; property.GetArrayElementAtIndex(0).objectReferenceValue = targ; } property.serializedObject.ApplyModifiedProperties(); } } else if (TypeUtil.IsType(elementType, typeof(UnityEngine.Object))) { property.arraySize = 1; var obj = property.serializedObject.targetObject; if (GameObjectUtil.IsGameObjectSource(obj)) { obj = GameObjectUtil.GetGameObjectFromSource(obj); } property.GetArrayElementAtIndex(0).objectReferenceValue = obj; property.serializedObject.ApplyModifiedProperties(); } }
public NodeType(string label, System.Type type) { this.label = label; this.type = type; }
public BinaryData(object data, System.Type type, Azure.Core.Serialization.ObjectSerializer?serializer = null) { throw null; }
public abstract bool TypeCheck(System.Type type);
public static void Unsubscribe(Base.Interfaces.IRecieveMessages listener, Base.Enumerations.ErrorLevel filterLevel, System.Type senderFilterType, System.Type messageFilterType) { foreach (Base.Interfaces.IRecieveMessages s in _subscribers) { if (s == listener && s.FilterLevel == filterLevel && s.SenderTypeFilter == senderFilterType && s.MessageTypeFilter == messageFilterType) { _subscribers.Remove(s); } } }
/// <summary> /// Initializes a new instance of the <see cref="TabPageCollectionEditor"/> class. /// </summary> /// <param name="type">The type of the collection for this editor to edit.</param> public TabPageCollectionEditor(System.Type type) : base(type) { }
/// <summary> /// Determines whether this instance [can convert from] the specified type. /// </summary> /// <param name="type">The type.</param> /// <returns> /// <c>true</c> if this instance [can convert from] the specified type; otherwise, <c>false</c>. /// </returns> public override bool CanConvertFrom(System.Type type) { // We only care about strings. return(type == typeof(string)); }
public static Object ObjectField(GUIContent label, Object obj, System.Type objType, bool allowSceneObjects, bool assetsMustBeInResourcesFolder) { obj = EditorGUILayout.ObjectField(label, obj, objType, allowSceneObjects); if (obj != null) { if (allowSceneObjects && !EditorUtility.IsPersistent(obj)) { // Object is in the scene var com = obj as Component; var go = obj as GameObject; if (com != null) { go = com.gameObject; } if (go != null && go.GetComponent <UnityReferenceHelper>() == null) { if (FixLabel("Object's GameObject must have a UnityReferenceHelper component attached")) { go.AddComponent <UnityReferenceHelper>(); } } } else if (EditorUtility.IsPersistent(obj)) { if (assetsMustBeInResourcesFolder) { string path = AssetDatabase.GetAssetPath(obj).Replace("\\", "/"); var rg = new System.Text.RegularExpressions.Regex(@"Resources/.*$"); if (!rg.IsMatch(path)) { if (FixLabel("Object must be in the 'Resources' folder")) { if (!System.IO.Directory.Exists(Application.dataPath + "/Resources")) { System.IO.Directory.CreateDirectory(Application.dataPath + "/Resources"); AssetDatabase.Refresh(); } string ext = System.IO.Path.GetExtension(path); string error = AssetDatabase.MoveAsset(path, "Assets/Resources/" + obj.name + ext); if (error == "") { path = AssetDatabase.GetAssetPath(obj); } else { Debug.LogError("Couldn't move asset - " + error); } } } if (!AssetDatabase.IsMainAsset(obj) && obj.name != AssetDatabase.LoadMainAssetAtPath(path).name) { if (FixLabel("Due to technical reasons, the main asset must\nhave the same name as the referenced asset")) { string error = AssetDatabase.RenameAsset(path, obj.name); if (error != "") { Debug.LogError("Couldn't rename asset - " + error); } } } } } } return(obj); }
/// <summary> /// Initializes a new instance of the <see cref="ZeroitAyensuTabPageCollectionEditor"/> class. /// </summary> /// <param name="type">The type of the collection for this editor to edit.</param> public ZeroitAyensuTabPageCollectionEditor(System.Type type) : base(type) { }
public static object Get(this Microsoft.Extensions.Configuration.IConfiguration configuration, [System.Diagnostics.CodeAnalysis.DynamicallyAccessedMembersAttribute(System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes.All)] System.Type type, System.Action <Microsoft.Extensions.Configuration.BinderOptions> configureOptions) { throw null; }
public static Microsoft.AspNetCore.Builder.IEndpointConventionBuilder AddComponent(this Microsoft.AspNetCore.Builder.IEndpointConventionBuilder builder, System.Type componentType, string selector) { throw null; }
public object ConvertBack(object value, System.Type targetType, object parameter, System.Globalization.CultureInfo culture) { throw new System.NotImplementedException(); }
public void LoadAsync(string path, System.Type assetType, CallBack <Object> callBack) { MonoBehaviourRuntime.Instance.StartCoroutine(LoadAssetsIEnumerator(path, assetType, callBack)); }
public override bool CanConvert(System.Type typeToConvert) { throw null; }